Fixes for maven central publishing.
This commit is contained in:
parent
3ef108654c
commit
a86df8b7b8
1 changed files with 34 additions and 3 deletions
|
|
@ -13,10 +13,14 @@ object Publish {
|
||||||
lazy val settings = Seq(
|
lazy val settings = Seq(
|
||||||
crossPaths := false,
|
crossPaths := false,
|
||||||
pomExtra := akkaPomExtra,
|
pomExtra := akkaPomExtra,
|
||||||
publishTo <<= akkaPublishTo,
|
publishTo <<= sonatypePublishTo,
|
||||||
credentials ++= akkaCredentials,
|
credentials ++= akkaCredentials,
|
||||||
organizationName := "Typesafe Inc.",
|
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(
|
lazy val versionSettings = Seq(
|
||||||
|
|
@ -24,7 +28,7 @@ object Publish {
|
||||||
)
|
)
|
||||||
|
|
||||||
def akkaPomExtra = {
|
def akkaPomExtra = {
|
||||||
<inceptionYear>2009</inceptionYear>
|
(<inceptionYear>2009</inceptionYear>
|
||||||
<url>http://akka.io</url>
|
<url>http://akka.io</url>
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
|
|
@ -33,6 +37,33 @@ object Publish {
|
||||||
<distribution>repo</distribution>
|
<distribution>repo</distribution>
|
||||||
</license>
|
</license>
|
||||||
</licenses>
|
</licenses>
|
||||||
|
<scm>
|
||||||
|
<url>git://github.com/akka/akka.git</url>
|
||||||
|
<connection>scm:git:git@github.com:akka/akka.git</connection>
|
||||||
|
</scm>) ++ 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]) =
|
||||||
|
<developers>
|
||||||
|
{
|
||||||
|
for((id, user) <- users)
|
||||||
|
yield <developer><id>{id}</id><name>{user}</name></developer>
|
||||||
|
}
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
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]] = {
|
def akkaPublishTo: Initialize[Option[Resolver]] = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue