Permalink
Browse files

Two new profiles for supporting legacy and new sbt dependencies

This commit allows us to move our build to consume the sbt artifacts created
and published by dbuild using [the following
configs](https://github.com/typesafehub/sbt-builds-for-ide), without breaking
the [Scala/IDE integration
script](https://github.com/scala/jenkins-scripts/blob/master/job/pr-scala-integrate-ide),
i.e., we maintain backward compatibility.

This of course is only meant to be an interim solution, in fact we are already working
on updating the Scala/IDE integration script to be compatible with the new build. However,
it will take some time before we can ship the new integration script, hence the idea of
supporting both way of building for a short amount of time.

One inconvenient of doing so is that a new profile must be now passed to the build.

* sbt-new: This is the profile defining the new sbt dependencies. In general, you will
           always want to run the build with this profile enabled.

* sbt-legacy: This is the profile allowing compatibility with the Scala/IDE integration
              script. There is really no reason for you to use this, unless you know what
              you are doing.

Once the transition to the new sbt dependencies is performed, we can revert this commit.

Credit for this commit goes to @huitseeker
  • Loading branch information...
1 parent 6d40a3c commit 633e0fe41868b7a47842f5f9feaa815812840375 @dotta dotta committed Aug 7, 2013
Showing with 233 additions and 40 deletions.
  1. +1 −1 build-all.sh
  2. +108 −18 org.scala-ide.sbt.full.library/pom.xml
  3. +124 −21 pom.xml
View
@@ -10,7 +10,7 @@ ROOT_DIR=${PWD}
if [ -z "$*" ]
then
- ARGS="-Pscala-2.10.x -Peclipse-juno clean install"
+ ARGS="-Pscala-2.10.x -Peclipse-juno -Psbt-new clean install"
else
ARGS="$*"
fi
@@ -39,25 +39,115 @@
</dependency>
</dependencies>
</profile>
- </profiles>
- <dependencies>
- <dependency>
- <groupId>com.typesafe.sbt</groupId>
- <artifactId>sbt-interface</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>com.typesafe.sbt</groupId>
- <artifactId>compiler-interface-precompiled</artifactId>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>com.typesafe.sbt</groupId>
- <artifactId>incremental-compiler</artifactId>
- <optional>true</optional>
- </dependency>
- </dependencies>
+ <profile>
+ <id>sbt-new</id>
+ <dependencies>
+ <dependency>
+ <groupId>com.typesafe.sbt</groupId>
+ <artifactId>sbt-interface</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>com.typesafe.sbt</groupId>
+ <artifactId>compiler-interface-precompiled</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>com.typesafe.sbt</groupId>
+ <artifactId>incremental-compiler</artifactId>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ <profile>
+ <id>sbt-legacy</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>classpath_${sbt.compiled.version}</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>logging_${sbt.compiled.version}</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>io_${sbt.compiled.version}</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>control_${sbt.compiled.version}</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>classfile_${sbt.compiled.version}</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>process_${sbt.compiled.version}</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>relation_${sbt.compiled.version}</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>interface_${sbt.compiled.version}</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>persist_${sbt.compiled.version}</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>api_${sbt.compiled.version}</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>compiler-integration_${sbt.compiled.version}</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>incremental-compiler_${sbt.compiled.version}</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>compile_${sbt.compiled.version}</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>compiler-interface_${sbt.compiled.version}</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <!-- all the dependencies necessary for running like sbinary, jline -->
+ <dependency>
+ <groupId>jline</groupId>
+ <artifactId>jline</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbinary</groupId>
+ <artifactId>sbinary_${sbt.compiled.version}</artifactId>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
<build>
<outputDirectory>${basedir}</outputDirectory>
View
145 pom.xml
@@ -59,8 +59,7 @@
<scala.library.version>${scala.version}</scala.library.version>
<version.suffix>2_10</version.suffix>
<version.tag>local</version.tag>
- <sbt.version>0.13.0</sbt.version>
- <sbt.ide.version>${sbt.version}-on-${scala.version}-for-IDE-SNAPSHOT</sbt.ide.version>
+ <sbt.version>Select a profile!</sbt.version>
<!-- the repos containing the Scala dependencies -->
<repo.scala-refactoring>Select a profile</repo.scala-refactoring>
@@ -77,7 +76,6 @@
<scala.version>2.10.3-SNAPSHOT</scala.version>
<scala.era.major.version>2.10</scala.era.major.version>
<version.suffix>2_10</version.suffix>
- <sbt.version>0.13.0</sbt.version>
<repo.scala-refactoring>${repo.scala-ide.root}/scala-refactoring-210x</repo.scala-refactoring>
<repo.scalariform>${repo.scala-ide.root}/scalariform-210x</repo.scalariform>
@@ -91,8 +89,6 @@
<scala.version>2.11.0-SNAPSHOT</scala.version>
<scala.era.major.version>2.11</scala.era.major.version>
<version.suffix>2_11</version.suffix>
- <!-- version here should be 0.13.1, but Zinc artfacts for 0.13.1 haven't been published yet. -->
- <sbt.version>0.13.0</sbt.version>
<repo.scala-refactoring>${repo.scala-ide.root}/scala-refactoring-211x</repo.scala-refactoring>
<repo.scalariform>${repo.scala-ide.root}/scalariform-211x</repo.scalariform>
@@ -126,6 +122,129 @@
</profile>
<profile>
+ <id>sbt-new</id>
+ <properties>
+ <sbt.version>0.13.0</sbt.version>
+ <sbt.ide.version>${sbt.version}-on-${scala.version}-for-IDE-SNAPSHOT</sbt.ide.version>
+ </properties>
+ <dependencyManagement>
+ <dependencies>
+ <!-- new sbt toolchain -->
+ <dependency>
+ <groupId>com.typesafe.sbt</groupId>
+ <artifactId>sbt-interface</artifactId>
+ <version>${sbt.ide.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.typesafe.sbt</groupId>
+ <artifactId>compiler-interface-precompiled</artifactId>
+ <version>${sbt.ide.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.typesafe.sbt</groupId>
+ <artifactId>incremental-compiler</artifactId>
+ <version>${sbt.ide.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ </profile>
+
+ <profile>
+ <id>sbt-legacy</id>
+ <properties>
+ <sbinary.version>0.4.2-SNAPSHOT</sbinary.version>
+ <sbt.version>0.13.0-RC5-SNAPSHOT</sbt.version>
+ <jline.version>2.10</jline.version>
+ <sbt.compiled.version>${scala.version}</sbt.compiled.version>
+ </properties>
+ <dependencyManagement>
+ <dependencies>
+ <!-- old sbt toolchain -->
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>classpath_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>logging_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>io_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>control_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>classfile_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>process_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>relation_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>interface_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>persist_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>api_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>compiler-integration_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>incremental-compiler_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>compile_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-sbt</groupId>
+ <artifactId>compiler-interface_${sbt.compiled.version}</artifactId>
+ <version>${sbt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>jline</groupId>
+ <artifactId>jline</artifactId>
+ <version>${jline.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-tools.sbinary</groupId>
+ <artifactId>sbinary_${sbt.compiled.version}</artifactId>
+ <version>${sbinary.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ </profile>
+
+ <profile>
<!-- some extra configuration for running tests with tycho on Mac OS -->
<id>macOs</id>
<activation>
@@ -270,22 +389,6 @@
<artifactId>continuations</artifactId>
<version>${scala.version}</version>
</dependency>
- <!-- toolchain, sbt -->
- <dependency>
- <groupId>com.typesafe.sbt</groupId>
- <artifactId>sbt-interface</artifactId>
- <version>${sbt.ide.version}</version>
- </dependency>
- <dependency>
- <groupId>com.typesafe.sbt</groupId>
- <artifactId>compiler-interface-precompiled</artifactId>
- <version>${sbt.ide.version}</version>
- </dependency>
- <dependency>
- <groupId>com.typesafe.sbt</groupId>
- <artifactId>incremental-compiler</artifactId>
- <version>${sbt.ide.version}</version>
- </dependency>
<!-- sdt.core dependencies -->
<dependency>
<groupId>com.miglayout</groupId>

0 comments on commit 633e0fe

Please sign in to comment.