From fd3f6447acb4c0f116f9ff4eee30ee031e531532 Mon Sep 17 00:00:00 2001 From: Pedro Larroy Date: Tue, 24 Feb 2015 14:34:02 +0100 Subject: [PATCH] Publishing to OSS sonatype --- project/build.scala | 70 ++++++++++++++++++++++++--------------------- project/plugins.sbt | 2 ++ 2 files changed, 40 insertions(+), 32 deletions(-) diff --git a/project/build.scala b/project/build.scala index 4dc558f..a980571 100644 --- a/project/build.scala +++ b/project/build.scala @@ -27,37 +27,6 @@ object Build extends sbt.Build { id = "runtime", base = file("runtime") ).settings(publishArtifact := true) - .settings(publishMavenStyle := true) - .settings(organization := "org.capnproto") - .settings(version := "0.1.0-SNAPSHOT") - .settings(autoScalaLibrary := false) - .settings(autoScalaLibrary in test := false) - .settings(publishTo := { - val nexus = "https://oss.sonatype.org/" - if (isSnapshot.value) - Some("snapshots" at nexus + "content/repositories/snapshots") - else - Some("releases" at nexus + "service/local/staging/deploy/maven2") - }) - .settings(pomExtra := ( - https://dwrensha.github.io/capnproto-java/index.html - - - MIT - http://opensource.org/licenses/MIT - repo - - - - git@github.com:dwrensha/capnproto-java.git - scm:git:git@github.com:dwrensha/capnproto-java.git - - - - dwrensha - David Renshaw - - )) .settings(crossPaths := false) // disable outputting the _ suffix lazy val examples = @@ -143,8 +112,43 @@ object Shared { resolvers += Resolver.sonatypeRepo("releases"), shellPrompt := ShellPrompt.buildShellPrompt, organization := "org.capnproto", - publishArtifact := false + publishArtifact := false, + publishTo := { + val nexus = "https://oss.sonatype.org/" + if (isSnapshot.value) + Some("snapshots" at nexus + "content/repositories/snapshots") + else + Some("releases" at nexus + "service/local/staging/deploy/maven2") + }, + credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"), + publishMavenStyle := true, + version := "0.1.0-SNAPSHOT", + publishArtifact in Test := false, + pomIncludeRepository := { x => false }, + pomExtra := ( + https://capnproto.org/ + + + MIT + http://opensource.org/licenses/MIT + repo + + + + git@github.com:dwrensha/capnproto-java.git + scm:git@github.com:dwrensha/capnproto-java.git + + + + dwrensha + David Renshaw + https://github.com/dwrensha + + + ) + ) + } object ShellPrompt { @@ -168,3 +172,5 @@ object ShellPrompt { } } } + + diff --git a/project/plugins.sbt b/project/plugins.sbt index bc26f28..368f9d8 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,4 +2,6 @@ addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.5.2") addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.7.4") +resolvers += Resolver.url("scalasbt", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases")) (Resolver.ivyStylePatterns) + addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.3")