Skip to content

Commit

Permalink
Prepare to deploy Maven central repository.
Browse files Browse the repository at this point in the history
  • Loading branch information
takezoux2 committed Nov 25, 2012
1 parent 150dff9 commit d3f2ffb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
11 changes: 11 additions & 0 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ object MessagePackScalaBuild extends Build {

lazy val dependsOnScalaVersion = (scalaVersion) { v => {
val specs = v match{
case "2.9.2" => "org.scala-tools.testing" %% "specs" % "1.6.9" % "test"
case "2.9.1-1" => "org.scala-tools.testing" % "specs_2.9.1" % "1.6.9" % "test"
case "2.9.1" => "org.scala-tools.testing" %% "specs" % "1.6.9" % "test"
case _ => "org.scala-tools.testing" %% "specs" % "1.6.8" % "test"
Expand All @@ -49,6 +50,16 @@ object MessagePackScalaBuild extends Build {
libraryDependencies ++= dependencies,
libraryDependencies ++= dependenciesForTest,
libraryDependencies <++= dependsOnScalaVersion,
publishMavenStyle := true,
publishArtifact in Test := false,
publishTo <<= version { (v: String) =>
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
pomIncludeRepository := { _ => false },
pomExtra := loadPomExtra()
)
)
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.7")
10 changes: 1 addition & 9 deletions project/pomExtra.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<pomExtra>
<name>${project.artifactId}</name>
<description>MessagePack for Scala ${scala.version}</description>
<description>MessagePack for Scala.</description>
<url>https://github.com/msgpack/msgpack-scala</url>
<inceptionYear>2011</inceptionYear>
<licenses>
Expand Down Expand Up @@ -46,13 +45,6 @@
</distributionManagement>
</profile>
</profiles>
<repositories>
<repository>
<id>msgpack.org</id>
<name>MessagePack Repository for Maven</name>
<url>http://msgpack.org/maven2/</url>
</repository>
</repositories>
<build>
<sourceDirectory>src/main/scala</sourceDirectory>
<testSourceDirectory>src/test/scala</testSourceDirectory>
Expand Down

0 comments on commit d3f2ffb

Please sign in to comment.