Repository: incubator-s2graph
Updated Branches:
  refs/heads/master ed0379917 -> 1c2bd045a


[S2GRAPH-115] added necessary machineries to publish to Maven Central


Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/04b731e5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/04b731e5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/04b731e5

Branch: refs/heads/master
Commit: 04b731e5fa55dd83162e3cf4eba706062f14ab5a
Parents: ed03799
Author: Jong Wook Kim <[email protected]>
Authored: Sun Nov 6 01:11:43 2016 -0500
Committer: Jong Wook Kim <[email protected]>
Committed: Sun Nov 6 01:12:46 2016 -0500

----------------------------------------------------------------------
 build.sbt               |  5 ++--
 project/Publisher.scala | 64 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 67 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/04b731e5/build.sbt
----------------------------------------------------------------------
diff --git a/build.sbt b/build.sbt
index 36b56fd..ae3efb3 100755
--- a/build.sbt
+++ b/build.sbt
@@ -25,7 +25,8 @@ name := "s2graph"
 lazy val commonSettings = Seq(
   organization := "org.apache.s2graph",
   scalaVersion := "2.11.7",
-  version := "0.1.0",
+  version := "0.1.1-SNAPSHOT",
+  isSnapshot := version.value.endsWith("-SNAPSHOT"),
   scalacOptions := Seq("-language:postfixOps", "-unchecked", "-deprecation", 
"-feature", "-Xlint", "-Xlint:-missing-interpolator"),
   javaOptions ++= 
collection.JavaConversions.propertiesAsScalaMap(System.getProperties).map { 
case (key, value) => "-D" + key + "=" + value }.toSeq,
   testOptions in Test += Tests.Argument("-oDF"),
@@ -35,7 +36,7 @@ lazy val commonSettings = Seq(
   resolvers ++= Seq(
     Resolver.mavenLocal
   )
-)
+) ++ Publisher.defaultSettings
 
 Revolver.settings
 

http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/04b731e5/project/Publisher.scala
----------------------------------------------------------------------
diff --git a/project/Publisher.scala b/project/Publisher.scala
new file mode 100644
index 0000000..add1279
--- /dev/null
+++ b/project/Publisher.scala
@@ -0,0 +1,64 @@
+import sbt.Keys._
+import sbt._
+import scala.xml.XML
+
+object Publisher {
+  val defaultSettings = Seq(
+    publishMavenStyle := true,
+    publishTo := {
+      if (isSnapshot.value) {
+        Some("apache" at 
"https://repository.apache.org/content/repositories/snapshots";)
+      } else {
+        Some("apache" at 
"https://repository.apache.org/content/repositories/releases";)
+      }
+    },
+    credentials ++= {
+      val xml = XML.loadFile(new File(System.getProperty("user.home")) / ".m2" 
/ "settings.xml")
+      for (server <- xml \\ "server" if (server \ "id").text == "apache") 
yield {
+        Credentials("Sonatype Nexus Repository Manager", 
"repository.apache.org", (server \ "username").text, (server \ "password").text)
+      }
+    },
+    pomIncludeRepository := { _ => false },
+    pomExtra := {
+      <url>https://github.com/apache/incubator-s2graph</url>
+      <licenses>
+        <license>
+          <name>Apache 2</name>
+          <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+        </license>
+      </licenses>
+      <scm>
+        <connection>scm:git://git.apache.org/incubator-s2graph.git</connection>
+        
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-s2graph.git</developerConnection>
+        <url>github.com/apache/incubator-s2graph</url>
+      </scm>
+      <developers>
+        <developer>
+          <id>s2graph</id>
+          <name>S2Graph Team</name>
+          <url>http://s2graph.incubator.apache.org/</url>
+        </developer>
+      </developers>
+      <mailingLists>
+        <mailingList>
+          <name>Dev Mailing List</name>
+          <post>[email protected]</post>
+          <subscribe>[email protected]</subscribe>
+          
<unsubscribe>[email protected]</unsubscribe>
+        </mailingList>
+        <mailingList>
+          <name>User Mailing List</name>
+          <post>[email protected]</post>
+          <subscribe>[email protected]</subscribe>
+          
<unsubscribe>[email protected]</unsubscribe>
+        </mailingList>
+        <mailingList>
+          <name>Commits Mailing List</name>
+          <post>[email protected]</post>
+          <subscribe>[email protected]</subscribe>
+          
<unsubscribe>[email protected]</unsubscribe>
+        </mailingList>
+      </mailingLists>
+    }
+  )
+}

Reply via email to