diff --git a/bin/sbt-setup b/bin/sbt-setup index 120e13da8..4b053b350 100755 --- a/bin/sbt-setup +++ b/bin/sbt-setup @@ -33,34 +33,119 @@ src_managed EOF mkdir -p project/build + +cat > project/build/Libraries.scala < ModuleID) +object ArtifactConfig { + implicit def defaultArtifactConfig: ArtifactConfig = new ArtifactConfig("", identity[ModuleID]) + implicit def testArtifactConfig: ArtifactConfig = new ArtifactConfig("test", identity[ModuleID]) +} + +trait LowPriorityLibraries { + self: DefaultProject => + + // "latest.integration", "latest.milestone", "latest.release" + def defaultRevision = "latest.integration" + protected implicit def defaultArtifactRevision = new ArtifactRevision(defaultRevision) + // protected implicit def defaultArtifactConfig = new ArtifactConfig("", identity[ModuleID]) + + protected implicit def autoConfig + (artifact: GroupArtifactID) + (implicit rev: ArtifactRevision, config: ArtifactConfig): ModuleID = + { + val ArtifactConfig(confs, fn) = config + fn( + if (confs == "") artifact % rev.revision + else artifact % rev.revision % config.confs + ) + } +} + +trait TestLibraries extends LowPriorityLibraries { + self: DefaultProject => + + private implicit val testDepConfig = ArtifactConfig("test", _.withSources) + val specs: ModuleID = "org.scala-tools.testing" %% "specs" + val scalacheck: ModuleID = "org.scala-tools.testing" %% "scalacheck" +} + +trait Libraries extends Repositories with TestLibraries { + self: DefaultProject => + + import ArtifactConfig.defaultArtifactConfig + + // val ant: ModuleID = "org.apache.ant" % "ant" + // val asmAll: ModuleID = "asm" % "asm-all" withSources() + // val easymock: ModuleID = "org.easymock" % "easymock" + // val guava: ModuleID = "com.google.guava" % "guava" + // val ivy: ModuleID = "org.apache.ivy" % "ivy" + // val jdt: ModuleID = "org.eclipse.jdt" % "core" notTransitive() + // val jetty: ModuleID = "org.mortbay.jetty" % "jetty" + // val jmock: ModuleID = "org.jmock" % "jmock" + // val jodaTime: ModuleID = "joda-time" % "joda-time" + // val liftJson: ModuleID = "net.liftweb" %% "lift-json" + // val maven: ModuleID = "org.apache.maven" % "maven-ant-tasks" + // val scalaARM: ModuleID = "com.github.jsuereth.scala-arm" %% "scala-arm" withSources() + val scalaImproving: ModuleID = "org.improving" %% "scala-improving" + // val scalaSTM: ModuleID = "org.scala-tools" %% "scala-stm" + // val scalariform: ModuleID = "org.scalariform" %% "scalariform" + // val scalazCore: ModuleID = "org.scalaz" %% "scalaz-core" withSources() + // val scalazHttp: ModuleID = "org.scalaz" %% "scalaz-http" withSources() + // val slf4s: ModuleID = "com.weiglewilczek.slf4s" %% "slf4s" withSources() +} +EOF + +cat > project/build/Repositories.scala < + + val localMaven = "Local Maven" at "file://"+Path.userHome+"/.m2/repository" + val localIvy = "Local Ivy" at "file://"+Path.userHome+"/.ivy2/local" + val sonatype = "Sonatype" at "https://oss.sonatype.org/content/groups/public" + val scalaToolsSnapshots = "Scala Tools Snapshots" at "http://scala-tools.org/repo-snapshots/" + val jboss = "JBoss Repo" at "http://repository.jboss.org/maven2" +} +EOF + cat > project/build/${PROJECT_CLASS}.scala < super.localScala case path => log.info("Found scala.local: " + path) List(defineScala("$SCALA_LOCAL_VERSION", new java.io.File(path))) - } - - val scalacheck = "org.scala-tools.testing" %% "scalacheck" % "latest.integration" % "test" withSources() - val specs = "org.scala-tools.testing" %% "specs" % "latest.integration" % "test" withSources() + } } EOF +mkdir -p project/plugins +cat > project/plugins/Plugins.scala < project/build.properties < "http://commons.apache.org/io/api-1.4/") +val commonsFileupload = "commons-fileupload" % "commons-fileupload" % "1.2.1" % "compile" +val commonsHttpClient = "commons-httpclient" % "commons-httpclient" % "3.1" % "compile" //ApacheV2 +val commonsIo = "commons-io" % "commons-io" % "1.4" +val commons_codec = "commons-codec" % "commons-codec" % "1.4" % "compile" //ApacheV2 +val commons_coll = "commons-collections" % "commons-collections" % "3.2.1" % "test" //ApacheV2 +val commons_logging = "commons-logging" % "commons-logging" % "1.1.1" % "compile" +val commons_pool = "commons-pool" % "commons-pool" % "1.5.4" % "compile" //ApacheV2 +val core = "org.processing" % "core" % "1.1" +val defaultProject = "com.twitter" % "standard-project" % "0.9.8" +val easymockclass = "org.easymock" % "easymockclassextension" % "2.4" +val eclipse = "de.element34" % "sbt-eclipsify" % "0.5.0" +val extract = "org.scala-tools.sbt" % "installer-plugin" % "0.3.0" +val google_coll = "com.google.collections" % "google-collections" % "1.0" % "compile" //ApacheV2 +val gpgPlugin = "com.rossabaker" % "sbt-gpg-plugin" % "0.1.1" +val gstreamerJava = "com.googlecode.gstreamer-java" % "gstreamer-java" % "1.4" +val gsvideo = gsvideoName % gsvideoName % gsvideoVersion % (gsvideoConf + "->default") from(gsvideoURL) +val guicey = "org.guiceyfruit" % "guice-all" % "2.0" % "compile" +val gwtAsyncGen = "com.samskivert" % "gwt-asyncgen" % "1.0" % "system" +val gwtDev = "com.google.gwt" % "gwt-dev" % "2.1.0" % "system" +val gwtServlet = "com.google.gwt" % "gwt-servlet" % "2.1.0" % "system" +val gwtUser = "com.google.gwt" % "gwt-user" % "2.1.0" +val gwtUtils = "com.threerings" % "gwt-utils" % "1.2-SNAPSHOT" +val httpclient = "org.apache.httpcomponents" % "httpclient" % "4.0.1" +val idea = "com.github.mpeltonen" % "sbt-idea-plugin" % "0.2-SNAPSHOT" +val ideaPlugin = groupId % "sbt-idea-plugin" % testedVersion +val ivy = "org.apache.ivy" % "ivy" % "2.1.0" % "compile;runtime;test" +val jackson = "org.codehaus.jackson" % "jackson-mapper-asl" % JACKSON_VERSION % "compile" //ApacheV2 +val jacksonCore = "org.codehaus.jackson" % "jackson-core-asl" % jacksonVersion withSources() +val jacksonMapper = "org.codehaus.jackson" % "jackson-mapper-asl" % jacksonVersion withSources () +val jackson_core = "org.codehaus.jackson" % "jackson-core-asl" % JACKSON_VERSION % "compile" //ApacheV2 +val jcip = "net.jcip" % "jcip-annotations" % "1.0" % "provided->default" +val configgy = "net.lag" % "configgy" % "2.0.2-nologgy" % "compile" //ApacheV2 +val easymock = "org.easymock" % "easymock" % "2.5.1" +val guava = "com.google.guava" % "guava" "latest.release" +val jetty = "org.mortbay.jetty" % "jetty" % "6.1.25" +val jmock = "org.jmock" % "jmock" % "2.4.0" +val jodaTime = "joda-time" % "joda-time" % "1.6" +val jsengine = "javax.script" % "js-engine" % "1.0" +val jsr166x = "jsr166x" % "jsr166x" % "1.0" % "compile" //CC Public Domain +val jsr250 = "javax.annotation" % "jsr250-api" % "1.0" % "compile" //CDDL v1 +val jsr311 = "javax.ws.rs" % "jsr311-api" % "1.1" % "compile" //CDDL v1 +val jta = "javax.transaction" % "jta" % "1.1" % "provided" +val junit = "junit" % "junit" % "4.5" +val junit = "junit" % "junit" % "4.8.2" % "test" +val junitInterface = "com.novocode" % "junit-interface" % "0.4" % "test" +val logback = "ch.qos.logback" % "logback-classic" % LOGBACK_VERSION % "compile" //LGPL 2.1 +val markdown = "org.markdownj" % "markdownj" % "0.3.0-1.0.2b4" % "runtime" +val maven = "org.apache.maven" % "maven-ant-tasks" % "2.1.0" % "compile;runtime;test" +val miglayout = "com.miglayout" % "miglayout" % "3.7.1" +val mockito = "org.mockito" % "mockito-all" % "1.8.0" % "test" +val multiverse = "org.multiverse" % "multiverse-alpha" % MULTIVERSE_VERSION % "compile" intransitive //ApacheV2 +val naggati = "net.lag" % "naggati" % "0.7.2" +val netty = "org.jboss.netty" % "netty" % "3.2.3.Final" +val objenesis = "org.objenesis" % "objenesis" % "1.0" +val objenesis = "org.objenesis" % "objenesis" % "1.2" % "compile" +val opengl = "org.processing" % "opengl" % processingVersion.value +val ostrich = "com.twitter" % "ostrich" % "2.3.4" +val paranamer = "com.thoughtworks.paranamer" % "paranamer" % "2.3" withSources() +val posterous = "net.databinder" % "posterous-sbt" % "0.1.4" +val proguard = "org.scala-tools.sbt" % "sbt-proguard-plugin" % "0.0.5" +val proguardJar = "net.sf.proguard" % "proguard" % "4.4" % "tools->default" +val protobuf = "com.google.protobuf" % "protobuf-java" % "2.3.0" % "compile" //New BSD +val rsync = "com.codahale" % "rsync-sbt" % "0.1.1" +val sbinary = "sbinary" % "sbinary" % "2.8.0-0.3.1" % "compile" //MIT +val sbtIdea = "com.github.mpeltonen" % "sbt-idea-plugin" % "0.1.0" +val scalariform = "org.scalariform" % "scalariform_2.8.0" % "0.0.7"%"compile;runtime;test" +val scalate = "org.fusesource.scalate" % "scalate-core" % "1.3-SNAPSHOT" +val scriptapi = "javax.script" % "script-api" % "1.0" +val scripted = "org.scala-tools.sbt" % "scripted" % "0.7.4" +val scriptedTestUtils = groupId % "sbt-idea-tests_2.7.7" % testedVersion +val scriptjs = "javax.script" % "script-js" % "1.0" +val servlet = "javax.servlet" % "servlet-api" % "2.5" withSources +val servletApi = "org.mortbay.jetty" % "servlet-api" % "2.5-20081211" % "provided" +val sfl4japi = "org.slf4j" % "slf4j-api" % slf4jVersion % "compile" +val simplespec = "com.codahale" %% "simplespec" % "0.2.0" % "test" withSources () +val sjson = "sjson.json" % "sjson" % "0.8-2.8.0" % "compile" //ApacheV2 +val spdeSbt = "us.technically.spde" % "spde-sbt-plugin" % "0.4.2" +val spde_core = "org.processing" % "core-android" % "1.1" +val spde_sbt = "us.technically.spde" % "spde-sbt-plugin" % "0.4.2" +val spde_video = "us.technically.spde" %% "spde-video" % spdeVersion.value +val squeryl = "org.squeryl" % "squeryl_2.8.0" % "0.9.4-RC3" +val thrift = "thrift" % "libthrift" % "0.5.0" +val util = "com.twitter" % "util" % "1.4.13" +val uuid = "com.eaio" % "uuid" % "3.2" % "compile" //MIT license +val vscaladoc = "org.scala-tools" % "vscaladoc" % "1.1-md-3" +val wikitext = "org.eclipse.mylyn.wikitext" % "wikitext" % "0.9.4.I20090220-1600-e3x" +val wikitextile = "org.eclipse.mylyn.wikitext" % "wikitext.textile" % "0.9.4.I20090220-1600-e3x" +val xrayspecs = "com.twitter" % "xrayspecs" % "1.0.7" + +dispatch-http +dispatch-futures +dispatch-mime +dispatch-json +dispatch-http-json +dispatch-lift-json +dispatch-oauth +dispatch-meetup +dispatch-couch +dispatch-twitter +dispatch-times +dispatch-s3 +dispatch-google