Created
February 5, 2014 23:34
-
-
Save steveturner/8835619 to your computer and use it in GitHub Desktop.
a sample build.sbt for publishing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Settings file for all the modules. | |
import sbt._ | |
import Keys._ | |
import Defaults._ | |
// Blank lines are required between settings. | |
organization in ThisBuild := "org.steve.test" | |
version in ThisBuild := "0.0.1-SNAPSHOT" | |
crossPaths in ThisBuild := false | |
organizationName in ThisBuild := "Steve Industries" | |
organizationHomepage in ThisBuild := Some(url("http://www.steve.com")) | |
scalacOptions in ThisBuild ++= Seq("-encoding", "UTF-8", "-deprecation", "-unchecked") | |
publishMavenStyle in ThisBuild := true | |
publishArtifact in Test := false | |
pomIncludeRepository := { x => false } | |
publishTo <<=version {(v:String) => | |
val nexus = "http://mvn.mydomain.com/nexus/" | |
if (v.trim.endsWith("SNAPSHOT")) | |
Some("snapshots" at nexus + "content/repositories/snapshots") | |
else | |
Some("releases" at nexus + "content/repositories/releases") | |
} | |
credentials in ThisBuild += Credentials (Path.userHome / ".ivy2" / ".credentials") | |
resolvers in ThisBuild ++= Seq( | |
"Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository", | |
Resolver.url("Local Ivy Repository", url("file://"+Path.userHome.absolutePath+"/.ivy2/local"))(Resolver.ivyStylePatterns), | |
"Typesafe Releases Repository" at "http://repo.typesafe.com/typesafe/releases/", | |
"Typesafe Snapshots Repository" at "http://repo.typesafe.com/typesafe/snapshots/", | |
"Maven Central" at "http://repo1.maven.org/maven2", | |
"Typesafe Maven Releases Repository" at "https://typesafe.artifactoryonline.com/typesafe/maven-releases/", | |
"Typesafe Maven Snapshots Repository" at "https://typesafe.artifactoryonline.com/typesafe/maven-snapshots/", | |
"sonatype-snapshots" at "https://oss.sonatype.org/content/repositories/snapshots", | |
"sonatype-releases" at "https://oss.sonatype.org/content/repositories/releases") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment