Permalink
Browse files

add to sonatype repository

  • Loading branch information...
1 parent c7920bb commit 0a4534487c5c3566f27e4e6f3699ca3075e79599 @slackhappy slackhappy committed Feb 28, 2012
Showing with 47 additions and 10 deletions.
  1. +5 −0 README.md
  2. +41 −9 build.sbt
  3. +1 −1 sbt
View
@@ -14,6 +14,11 @@ You will probably want to override FHttpClient.service to add your own logging a
##[API Docs](http://foursquare.github.com/foursquare-fhttp/api/)##
+## Adding FHttp to your build ##
+The project is cross-compiled for scala 2.8.1 and scala 2.9.1. In your build.sbt, add:
+ "com.foursquare" %% "foursquare-fhttp" % "0.1.4"
+
+
## Some Simple Examples ##
import com.foursquare.fhttp._
import com.foursquare.fhttp.FHttpRequest._
View
@@ -26,26 +26,28 @@ libraryDependencies <++= (scalaVersion) { scalaVersion =>
)
}
-publishTo <<= (version) { v =>
- val nexus = "http://nexus.scala-tools.org/content/repositories/"
- if (v.endsWith("-SNAPSHOT"))
- Some("snapshots" at nexus+"snapshots/")
- else
- Some("releases" at nexus+"releases/")
-}
+
resolvers += "twitter mvn" at "http://maven.twttr.com"
scalacOptions ++= Seq("-deprecation", "-unchecked")
testFrameworks += new TestFramework("com.novocode.junit.JUnitFrameworkNoMarker")
+publishTo <<= (version) { v =>
+ val nexus = "https://oss.sonatype.org/"
+ if (v.endsWith("-SNAPSHOT"))
+ Some("snapshots" at nexus+"content/repositories/snapshots/")
+ else
+ Some("releases" at nexus+"service/local/staging/deploy/maven2")
+}
+
credentials ++= {
- val scalaTools = ("Sonatype Nexus Repository Manager", "nexus.scala-tools.org")
+ val sonaType = ("Sonatype Nexus Repository Manager", "oss.sonatype.org")
def loadMavenCredentials(file: java.io.File) : Seq[Credentials] = {
xml.XML.loadFile(file) \ "servers" \ "server" map (s => {
val host = (s \ "id").text
- val realm = if (host == scalaTools._2) scalaTools._1 else "Unknown"
+ val realm = if (host == sonaType._2) sonaType._1 else "Unknown"
Credentials(realm, host, (s \ "username").text, (s \ "password").text)
})
}
@@ -57,3 +59,33 @@ credentials ++= {
case _ => Nil
}
}
+
+publishMavenStyle := true
+
+publishArtifact in Test := false
+
+pomIncludeRepository := { x => false }
+
+pomExtra := (
+<url>https://github.com/foursquare/foursquare-fhttp</url>
+<licenses>
+ <license>
+ <name>Apache 2</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ <comments>A business-friendly OSS license</comments>
+ </license>
+</licenses>
+<scm>
+ <url>git@github.com/foursquare/foursquare-fhttp.git</url>
+ <connection>scm:git:git@github.com/foursquare/foursquare-fhttp.git</connection>
+</scm>
+<developers>
+ <developer>
+ <id>john</id>
+ <name>John Gallagher</name>
+ <email>john@foursquare.com</email>
+ </developer>
+</developers>
+)
+
View
2 sbt
@@ -1,6 +1,6 @@
#!/bin/sh
-LATEST=http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-launch/0.11.0/sbt-launch.jar
+LATEST=http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-tools.sbt/sbt-launch/0.11.2/sbt-launch.jar
if [ ! -d .sbtlib ]; then
mkdir .sbtlib

0 comments on commit 0a45344

Please sign in to comment.