diff --git a/project/Publish.scala b/project/Publish.scala index 9cea85af3c..ec097bbab7 100644 --- a/project/Publish.scala +++ b/project/Publish.scala @@ -13,10 +13,14 @@ object Publish { lazy val settings = Seq( crossPaths := false, pomExtra := akkaPomExtra, - publishTo <<= akkaPublishTo, + publishTo <<= sonatypePublishTo, credentials ++= akkaCredentials, organizationName := "Typesafe Inc.", - organizationHomepage := Some(url("http://www.typesafe.com")) + organizationHomepage := Some(url("http://www.typesafe.com")), + publishMavenStyle := true, + // Maven central cannot allow other repos. + // TODO - Make sure all artifacts are on central. + pomIncludeRepository := { x => false } ) lazy val versionSettings = Seq( @@ -24,7 +28,7 @@ object Publish { ) def akkaPomExtra = { - 2009 + (2009 http://akka.io @@ -33,6 +37,33 @@ object Publish { repo + + git://github.com/akka/akka.git + scm:git:git@github.com:akka/akka.git + ) ++ makeDevelopersXml(Map( + "jboner" -> "Jonas Boner", + "legendofklang" -> "Viktor Klang", + "rkuhn" -> "Roland Kuhn", + "pvlugter" -> "Peter Vlugter" + // TODO - More than the names in the last 10 commits + )) + } + + + private[this] def makeDevelopersXml(users: Map[String,String]) = + + { + for((id, user) <- users) + yield {id}{user} + } + + + def sonatypePublishTo: Initialize[Option[Resolver]] = { + 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") + } } def akkaPublishTo: Initialize[Option[Resolver]] = {