Browse files

partly updated sbt to 0.10.1

  • Loading branch information...
1 parent 743f181 commit 2c8dd0c7836d36faa33313ea4078b125a588b822 @chrreisinger committed Aug 3, 2011
View
BIN bin/sbt-launch.jar
Binary file not shown.
View
43 bin/sbt.boot.properties
@@ -1,43 +0,0 @@
-[scala]
- version: 2.7.7
- classifiers: sources
- #classifiers: sources, javadoc
-
-[app]
- org: org.scala-tools.sbt
- name: sbt
- version: read(sbt.version)
- class: sbt.xMain
- components: xsbti
- cross-versioned: true
- #classifiers: sources, javadoc
-
-[repositories]
- local
- maven-local
- sbt-db: http://databinder.net/repo/, [organization]/[module]/[revision]/[type]s/[artifact](-[classifier]).[ext]
- maven-central
- scala-tools-releases
- scala-tools-snapshots
-
-[boot]
- directory: project/boot
- properties: project/build.properties
- prompt-create: Project does not exist, create new project?
- prompt-fill: true
- quick-option: true
-
-[log]
- level: info
-
-[app-properties]
- project.name: quick=set(test), new=prompt(Name), fill=prompt(Name)
- project.organization: new=prompt(Organization)
- project.version: quick=set(1.0), new=prompt(Version)[1.0], fill=prompt(Version)[1.0]
- build.scala.versions: quick=set(2.7.7), new=prompt(Scala version)[2.7.7], fill=prompt(Scala version)[2.7.7]
- sbt.version: quick=set(0.7.4), new=prompt(sbt version)[0.7.4], fill=prompt(sbt version)[0.7.4]
- project.scratch: quick=set(true)
- project.initialize: quick=set(true), new=set(true)
-
-#[ivy]
-# cache-directory: /home/user/.ivy2/cache2
View
74 project/Build.scala
@@ -0,0 +1,74 @@
+import sbt._
+import Keys._
+import Package.ManifestAttributes
+import java.util.jar.Attributes.Name._
+
+object OpenVCBuild extends Build {
+ val dependencies = Seq(
+ //download antlr from github with my scala target changes, switch back to a maven version when the scala target is good enough
+ "org.antlr" % "antlr" % "3.3" % "antlr->default" from "http://cloud.github.com/downloads/chrreisinger/OpenVC/antlr-3.3.jar" intransitive(),
+ "org.antlr" % "antlr-runtime" % "3.4" intransitive(),
+ "asm" % "asm-all" % "3.3.1",
+ "commons-cli" % "commons-cli" % "1.2",
+ "org.scalatest" % "scalatest_2.9.0" % "1.6.1" % "test",
+ "junit" % "junit" % "4.8.2" % "test"
+ )
+
+ val buildVersion = "0.1"
+ val buildSettings = Defaults.defaultSettings ++ sbtassembly.Plugin.assemblySettings ++ SbtShPlugin.settings ++ ProguardPlugin.proguardSettings ++ Seq(
+ name := "OpenVC",
+ organization := "com.github.chrreisinger",
+ scalaVersion := "2.9.0-1",
+ //TODO resources := Seq("NOTICE.txt", "LICENSE.txt"), // ++ (path("licenses") * "*"),
+ //TODO clean <<= clean.dependsOn(cleanAntlr), //Make the antlr clean task run on project clean.
+ //TODO compile <<= compile.dependsOn(antlr), //Run the antlr task before compilation.
+ javacOptions ++= Seq("-source", "1.7", "-target", "1.7"),
+ scalacOptions ++= Seq("-deprecation", "-unchecked", "-g:vars", "-target:jvm-1.5", "-explaintypes"),
+ scaladocOptions := Seq("-unchecked", "-doc-title", "OpenVC scaladoc", "-doc-source-url", "https://github.com/chrreisinger/OpenVC/tree/master/src/main/scala", "-doc-version", buildVersion),
+ version := buildVersion,
+ packageOptions ++= Seq[PackageOption](ManifestAttributes(
+ (IMPLEMENTATION_TITLE, "OpenVC"),
+ (IMPLEMENTATION_URL, "https://github.com/chrreisinger/OpenVC"),
+ (IMPLEMENTATION_VENDOR, "Christian Reisinger"),
+ (IMPLEMENTATION_VERSION, buildVersion),
+ (SEALED, "true"))
+ ),
+ ivyConfigurations += config("antlr").hide,
+ libraryDependencies := dependencies,
+ ProguardPlugin.makeInJarFilter <<= (ProguardPlugin.makeInJarFilter) {
+ (makeInJarFilter) => {
+ (file) => file match {
+ case "scala-library.jar" => "!META-INF/**" + ",!library.properties"
+ case _ => "!META-INF/**"
+ }
+ }
+ },
+ ProguardPlugin.proguardOptions ++= Seq(
+ ProguardPlugin.keepMain("at.jku.ssw.openvc.*"),
+ ProguardPlugin.keepLimitedSerializability,
+ "-keep class scala.ScalaObject",
+ "-keepclassmembers class scala.Some,scala.Tuple*,scala.collection.** { *; }",
+ "-keep class at.jku.ssw.openvs.** { *; }",
+ "-dontskipnonpubliclibraryclasses",
+ "-dontskipnonpubliclibraryclassmembers",
+ "-dontnote",
+ "-printconfiguration",
+ "-whyareyoukeeping class scala.Tuple5"
+ )
+ )
+
+ //TODO add task to generate parser and lexer from ANTLR grammar
+ lazy val common = Project("OpenVC", file("."), settings = buildSettings)
+}
+
+
+object SbtShPlugin extends Plugin {
+ override lazy val settings = Seq(Keys.commands += shCommand)
+
+ def shCommand = Command.args("sh", "<shell command>") {
+ (state, args) =>
+ args.mkString(" ").!
+ state
+ }
+
+}
View
9 project/build.properties
@@ -1,8 +1 @@
-#Project properties
-#Thu Jul 15 10:17:57 CEST 2010
-project.organization=JKU Linz
-project.name=OpenVC
-sbt.version=0.7.6.RC0
-project.version=0.0.1
-build.scala.versions=2.9.0
-project.initialize=false
+sbt.version=0.10.1
View
76 project/build/src/Project.scala
@@ -1,76 +0,0 @@
-import sbt._
-import sbt.Process._
-import de.element34.sbteclipsify._
-
-final class Project(info: ProjectInfo) extends DefaultProject(info) with Eclipsify with IdeaProject with ProguardProject {
- //download antlr from github with my scala target changes, switch back to a maven version when the scala target is good enough
- val antlrComplete = "org.antlr" % "antlr" % "3.3" from "http://cloud.github.com/downloads/chrreisinger/OpenVC/antlr-3.3.jar"
- val antlrRuntimeJar = "org.antlr" % "antlr-runtime" % "3.3" withSources()
- val asmJar = "asm" % "asm-all" % "3.3.1" withSources()
- val scalaTestJar = "org.scalatest" % "scalatest" % "1.3" withSources() withJavadoc()
- val commonsCLI = "commons-cli" % "commons-cli" % "1.2" withSources() withJavadoc()
-
- override val compileOptions = super.compileOptions ++ (Unchecked :: Deprecation :: /*Optimize ::*/ Nil)
-
- //scala doc options
- override def documentOptions = super.documentOptions ++ (documentTitle("OpenVC Scaladoc") /*:: LinkSource*/ :: Nil)
-
- //overrides the name of the produced jar.
- override val artifactID = "OpenVC"
-
- override val mainResources = super.mainResources +++ "NOTICE.txt" +++ "LICENSE.txt" +++ (path("licenses") * "*")
-
- //Task to generate antlr parser and lexer from the grammar, code and ideas taken from:
- //http://code.google.com/p/sbt-rats/source/browse/src/RatsProject.scala
- //http://code.google.com/p/simple-build-tool/wiki/ProjectDefinitionExamples#Conditional_Task
-
- //The directory in which the grammars are stored.
- lazy val grammarPath = mainScalaSourcePath / "at" / "jku" / "ssw" / "openvc" / "parser"
-
- //A task to delete the generated Antlr parser.
- lazy val cleanAntlr =
- cleanTask((grammarPath / ("Lexer.scala")) +++ (grammarPath / ("Parser.scala"))) describedAs ("delete the generated Antlr parser and lexer")
-
- /**
- * A task to run Antlr on the main parser module. The generated parser and lexer
- * will be written to a file with the same name as the grammar,
- * but with a .scala extension. This task depends on all .g files
- * in the project source directories, whether they are actually used by
- * the main module or not.
- */
- lazy val antlr = {
- val srcs = descendents(mainSourceRoots, "*.g")
- val fmt = "java -cp %s org.antlr.Tool -fo %s %s %s"
- val classpath = Path.makeString(compileClasspath.get)
- val cmd = fmt.format(classpath, grammarPath, grammarPath / ("Lexer.g"), grammarPath / ("Parser.g"))
- fileTask("Generate parser from " + grammarPath, grammarPath / ("Parser.scala") from srcs) {
- if (cmd ! log == 0) {
- FileUtilities.clean(grammarPath / ("Parser.tokens"), log)
- FileUtilities.clean(grammarPath / ("Lexer.tokens"), log)
- } else
- Some("Antlr! failed")
- } describedAs ("Generate Antlr parser and lexer")
- }
-
- //Make the antlr clean task run on project clean.
- override def cleanAction = super.cleanAction dependsOn (cleanAntlr)
-
- //Run the antlr task before compilation.
- override def compileAction = super.compileAction dependsOn (antlr)
-
- override val proguardInJars = super.proguardInJars.filter {
- pathFinder =>
- val name = pathFinder.asFile.getName
- !(name.contains("scalatest") || name.contains("sources") || name.contains("javadoc") || name.contains("antlr-3.3") || name.contains("stringtemplate"))
- } +++ scalaLibraryPath
-
- override def makeInJarFilter(file: String) = file match {
- case "scala-library.jar" => "!META-INF/**" + ",!library.properties"
- case _ => "!META-INF/**"
- }
-
- //override val minJarName = artifactBaseName + ".min.jar"
-
- override val proguardOptions = List(proguardKeepMain("at.jku.ssw.openvc.*"), proguardKeepLimitedSerializability, "-keep class scala.ScalaObject", "-keepclassmembers class scala.Some,scala.Tuple*,scala.collection.** { *; }",
- """-keep class at.jku.ssw.openvs.** { *; }""", "-dontskipnonpubliclibraryclasses", "-dontskipnonpubliclibraryclassmembers", "-dontnote", "-printconfiguration", "-whyareyoukeeping class scala.Tuple5")
-}
View
10 project/plugins/Plugins.scala
@@ -1,10 +0,0 @@
-import sbt._
-
-class Plugins(info: ProjectInfo) extends PluginDefinition(info) {
- lazy val eclipsifyPlugin = "de.element34" % "sbt-eclipsify" % "0.7.0"
-
- val sbtIdeaRepo = "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"
- val sbtIdea = "com.github.mpeltonen" % "sbt-idea-plugin" % "0.4.0"
- val proguardPlugin = "org.scala-tools.sbt" % "sbt-proguard-plugin" % "0.0.+"
-}
-
View
30 project/plugins/build.sbt
@@ -0,0 +1,30 @@
+//sbt-idea
+resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"
+
+libraryDependencies += "com.github.mpeltonen" %% "sbt-idea" % "0.10.0"
+
+//xsbt-proguard-plugin
+resolvers += "Proguard plugin repo" at "http://siasia.github.com/maven2"
+
+libraryDependencies <+= sbtVersion("com.github.siasia" %% "xsbt-proguard-plugin" % _)
+
+//sbteclipse
+resolvers += {
+ val typesafeRepoUrl = new java.net.URL("http://repo.typesafe.com/typesafe/releases")
+ val pattern = Patterns(false, "[organisation]/[module]/[sbtversion]/[revision]/[type]s/[module](-[classifier])-[revision].[ext]")
+ Resolver.url("Typesafe Repository", typesafeRepoUrl)(pattern)
+}
+
+libraryDependencies <<= (libraryDependencies, sbtVersion) { (deps, version) =>
+ deps :+ ("com.typesafe.sbteclipse" %% "sbteclipse" % "1.3-RC1" extra("sbtversion" -> version))
+}
+
+//sbt-assembly
+libraryDependencies <+= (sbtVersion) { sv => "com.eed3si9n" %% "sbt-assembly" % ("sbt" + sv + "_0.5") }
+
+//sbt-netbeans-plugin
+resolvers += ScalaToolsSnapshots
+
+resolvers += "remeniuk repo" at "http://remeniuk.github.com/maven"
+
+libraryDependencies += "org.netbeans" %% "sbt-netbeans-plugin" % "0.1.2"
View
69 project/project.iml
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="scala" name="Scala">
- <configuration>
- <option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="defScala" />
- <option name="deprecationWarnings" value="true" />
- <option name="explainTypeErrors" value="true" />
- <option name="uncheckedWarnings" value="true" />
- </configuration>
- </facet>
- </component>
- <component name="NewModuleRootManager" inherit-compiler-output="true">
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/build" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/build/src" isTestSource="false" />
- <excludeFolder url="file://$MODULE_DIR$/boot" />
- <excludeFolder url="file://$MODULE_DIR$/build/target" />
- <excludeFolder url="file://$MODULE_DIR$/plugins/lib_managed" />
- <excludeFolder url="file://$MODULE_DIR$/plugins/src_managed" />
- <excludeFolder url="file://$MODULE_DIR$/plugins/target" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="defScala" level="project" />
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="file://$MODULE_DIR$/boot/scala-2.7.7/org.scala-tools.sbt/sbt/0.7.6.RC0" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$MODULE_DIR$/boot/scala-2.7.7/org.scala-tools.sbt/sbt/0.7.6.RC0" recursive="true" />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="file://$MODULE_DIR$/plugins/target/scala_2.7.7/plugin-classes" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="file://$MODULE_DIR$/build/lib" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$MODULE_DIR$/build/lib" recursive="false" />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="file://$MODULE_DIR$/plugins/lib_managed/scala_2.7.7" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$MODULE_DIR$/plugins/lib_managed/scala_2.7.7" recursive="false" />
- </library>
- </orderEntry>
- </component>
-</module>
-
View
BIN project/sbt-launch.jar
Binary file not shown.
View
68 project/sbt_project_definition.iml
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module type="JAVA_MODULE" version="4">
- <component name="FacetManager">
- <facet type="scala" name="Scala">
- <configuration>
- <option name="compilerLibraryLevel" value="Project" />
- <option name="compilerLibraryName" value="defScala" />
- </configuration>
- </facet>
- </component>
- <component name="NewModuleRootManager" inherit-compiler-output="false">
- <output url="file://$MODULE_DIR$/target/scala_2.8.1/classes" />
- <output-test url="file://$MODULE_DIR$/target/scala_2.8.1/test-classes" />
- <exclude-output />
- <content url="file://$MODULE_DIR$">
- <sourceFolder url="file://$MODULE_DIR$/build" isTestSource="false" />
- <sourceFolder url="file://$MODULE_DIR$/build/src" isTestSource="false" />
- <excludeFolder url="file://$MODULE_DIR$/boot" />
- <excludeFolder url="file://$MODULE_DIR$/build/target" />
- <excludeFolder url="file://$MODULE_DIR$/plugins/lib_managed" />
- <excludeFolder url="file://$MODULE_DIR$/plugins/src_managed" />
- <excludeFolder url="file://$MODULE_DIR$/plugins/target" />
- </content>
- <orderEntry type="inheritedJdk" />
- <orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="library" name="defScala" level="project" />
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="file://$MODULE_DIR$/boot/scala-2.7.7/org.scala-tools.sbt/sbt/0.7.4" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$MODULE_DIR$/boot/scala-2.7.7/org.scala-tools.sbt/sbt/0.7.4" recursive="true" />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="file://$MODULE_DIR$/plugins/target/scala_2.7.7/plugin-classes" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="file://$MODULE_DIR$/build/lib" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$MODULE_DIR$/build/lib" recursive="false" />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library>
- <CLASSES>
- <root url="file://$MODULE_DIR$/plugins/lib_managed/scala_2.7.7" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- <jarDirectory url="file://$MODULE_DIR$/plugins/lib_managed/scala_2.7.7" recursive="false" />
- </library>
- </orderEntry>
- </component>
-</module>
-
View
2 sbt.bat
@@ -1,2 +1,2 @@
set SCRIPT_DIR=%~dp0
-java -server -Xmx512M -Xss3M -jar "%SCRIPT_DIR%bin/sbt-launch.jar" "@sbt.boot.properties" %*
+java -Dfile.encoding=UTF8 -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m -server -Xmx512M -Xss3M -jar "%SCRIPT_DIR%project\sbt-launch.jar" %*
View
2 sbt.sh
@@ -1,2 +1,2 @@
#!/bin/sh
-java -server -Xmx512M -Xss3M -jar `dirname $0`/bin/sbt-launch.jar "@sbt.boot.properties" "$@"
+java -Dfile.encoding=UTF8 -Dsbt.boot.directory=~/.sbt/boot/ -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256m -server -Xmx512M -Xss3M -jar `dirname $0`/project/sbt-launch.jar "$@"

0 comments on commit 2c8dd0c

Please sign in to comment.