Skip to content

Commit

Permalink
Fix dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Ngoc Dao authored and Ngoc Dao committed Dec 4, 2012
1 parent 230e3a2 commit a0fe642
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 48 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.*
project
project/project
project/target
target
6 changes: 0 additions & 6 deletions DEV

This file was deleted.

41 changes: 0 additions & 41 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,3 @@ scalacOptions ++= Seq(
"-deprecation",
"-unchecked"
)

// Publish ---------------------------------------------------------------------
// https://github.com/sbt/sbt.github.com/blob/gen-master/src/jekyll/using_sonatype.md

// https://github.com/harrah/xsbt/wiki/Cross-Build
//crossScalaVersions := Seq("2.9.1", "2.9.2")
scalaVersion := "2.9.2"

publishTo <<= (version) { version: String =>
val nexus = "https://oss.sonatype.org/"
if (version.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}

publishMavenStyle := true

publishArtifact in Test := false

pomIncludeRepository := { _ => false }

pomExtra := (
<url>http://ngocdaothanh.github.com/xitrum/</url>
<licenses>
<license>
<name>MIT</name>
<url>https://github.com/ngocdaothanh/xitrum/blob/master/MIT-LICENSE</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>git@github.com:ngocdaothanh/xitrum.git</url>
<connection>scm:git:git@github.com:ngocdaothanh/xitrum.git</connection>
</scm>
<developers>
<developer>
<id>ngocdaothanh</id>
<name>Ngoc Dao</name>
<url>http://cntt.tv</url>
</developer>
</developers>
)
20 changes: 20 additions & 0 deletions dev/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Publish to Sonatype
-------------------

See:
https://github.com/sbt/sbt.github.com/blob/gen-master/src/jekyll/using_sonatype.md

1. Copy content of
dev/build.sbt.end to the end of build.sbt
dev/plugins.sbt.end to the end of project/plugins.sbt
2. Run ``sbt publish``. Alternatively you can run ``sbt`` then from SBT
command prompt run ``+ publish``.
3. Login at https://oss.sonatype.org/ and from "Staging Repositories" select the
newly published item, click "Close" then "Release".

This workflow is for others to easily do ``sbt publish-local`` without PGP key.
Otherwise there will be error:

::

java.io.FileNotFoundException: ~/.sbt/gpg/secring.asc (No such file or directory)
36 changes: 36 additions & 0 deletions dev/build.sbt.end
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Publish to Sonatype -------------------------------------------------------
// https://github.com/sbt/sbt.github.com/blob/gen-master/src/jekyll/using_sonatype.md

publishTo <<= (version) { version: String =>
val nexus = "https://oss.sonatype.org/"
if (version.trim.endsWith("SNAPSHOT")) Some("snapshots" at nexus + "content/repositories/snapshots")
else Some("releases" at nexus + "service/local/staging/deploy/maven2")
}

publishMavenStyle := true

publishArtifact in Test := false

pomIncludeRepository := { _ => false }

pomExtra := (
<url>https://github.com/ngocdaothanh/sclasner</url>
<licenses>
<license>
<name>MIT</name>
<url>https://github.com/ngocdaothanh/sclasner/blob/master/MIT-LICENSE</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>git@github.com:ngocdaothanh/sclasner.git</url>
<connection>scm:git:git@github.com:ngocdaothanh/sclasner.git</connection>
</scm>
<developers>
<developer>
<id>ngocdaothanh</id>
<name>Ngoc Dao</name>
<url>http://cntt.tv</url>
</developer>
</developers>
)
5 changes: 5 additions & 0 deletions dev/plugins.sbt.end
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// http://www.cakesolutions.net/teamblogs/2012/01/28/publishing-sbt-projects-to-nexus/

resolvers += Resolver.url("sbt-plugin-releases", new URL("http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns)

addSbtPlugin("com.jsuereth" % "xsbt-gpg-plugin" % "0.6")
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.sbteclipse" % "sbteclipse-plugin" % "2.1.0")

0 comments on commit a0fe642

Please sign in to comment.