Permalink
Browse files

Added support for builds relative to both Scala 2.8.0.final and Scala…

… trunk.
  • Loading branch information...
1 parent d50d5b1 commit 63cc8a70622d396693a6559cdd801f7636ba879f @milessabin milessabin committed Aug 11, 2010
@@ -0,0 +1 @@
+pom.xml.versionsBackup
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+. $(dirname $0)/env.sh
+
+SCALA_VERSION=2.8.0
+
+set_version ${SCALA_VERSION}
+
+build $*
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+. $(dirname $0)/env.sh
+
+SCALA_VERSION=2.8.0-SNAPSHOT
+
+set_version ${SCALA_VERSION}
+
+build $*
@@ -0,0 +1,29 @@
+# MAVEN needs to point to a MAVEN3 installation:
+if which mvn >/dev/null; then
+ mvn -version | grep "Maven 3" > /dev/null
+ if [ $? -eq 0 ]; then
+ MAVEN="mvn"
+ fi
+fi
+
+if [ "X$MAVEN" = "X" ] ; then
+ echo "Missing environment variable \"MAVEN\". This has to point to a maven 3.0 installation, "
+ echo "e.g. add the following line to your .bashrc (and make sure the path is correct):"
+ echo "export MAVEN=/opt/apache-maven-3.0-beta-1/bin/mvn"
+ exit
+fi
+
+set_version()
+{
+ ${MAVEN} -f pom.xml -N versions:set -DnewVersion=$1
+ ${MAVEN} -f pom.xml -N versions:update-child-modules
+}
+
+build()
+{
+ ${MAVEN} \
+ -U \
+ -Dscala.version=${SCALA_VERSION} \
+ clean install $*
+}
+
@@ -4,12 +4,11 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.scala-ide</groupId>
<artifactId>scala-toolchain-for-eclipse</artifactId>
- <version>2.8.0</version>
+ <version>2.8.0-SNAPSHOT</version>
<name>The Scala Toolchain for Eclipse</name>
<packaging>pom</packaging>
<properties>
- <scala.toolchain.version>2.8.0</scala.toolchain.version>
<scala.version>2.8.0</scala.version>
<encoding>UTF-8</encoding>
</properties>
@@ -48,6 +47,14 @@
<name>Scala Tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</repository>
+ <repository>
+ <id>scala-tools.snapshot</id>
+ <name>Scala Tools maven snapshot repository</name>
+ <url>http://scala-tools.org/repo-snapshots</url>
+ <snapshots>
+ <updatePolicy>daily</updatePolicy>
+ </snapshots>
+ </repository>
</repositories>
<build>
<pluginManagement>
@@ -2,8 +2,6 @@
. $(dirname $0)/env.sh
-SCALA_TOOLCHAIN_VERSION=2.8.0
SCALA_VERSION=2.8.0
-set_toolchain_version ${SCALA_TOOLCHAIN_VERSION}
-build_both $*
+build $*
@@ -2,9 +2,6 @@
. $(dirname $0)/env.sh
-SCALA_TOOLCHAIN_VERSION=2.8.0-trunk
-SCALA_VERSION=2.8.0.trunk
-
-set_toolchain_version ${SCALA_TOOLCHAIN_VERSION}
-build_both $*
+SCALA_VERSION=2.8.0-SNAPSHOT
+build $*
@@ -13,24 +13,10 @@ if [ "X$MAVEN" = "X" ] ; then
exit
fi
-set_toolchain_version()
+build()
{
- ${MAVEN} -f toolchain-pom.xml -N versions:set -DnewVersion=$1
- ${MAVEN} -f toolchain-pom.xml -N versions:update-child-modules
+ ${MAVEN} \
+ -U \
+ -Dscala.version=${SCALA_VERSION} \
+ clean install $*
}
-
-build_both()
-{
- ${MAVEN} \
- -U \
- -Dscala.toolchain.version=${SCALA_TOOLCHAIN_VERSION} \
- -Dscala.version=${SCALA_VERSION} \
- -f toolchain-pom.xml \
- clean install $* && \
- ${MAVEN} \
- -U \
- -Dscala.toolchain.version=${SCALA_TOOLCHAIN_VERSION} \
- -Dscala.version=${SCALA_VERSION} \
- clean install $*
-}
-
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.scala-ide</groupId>
<artifactId>scala-ide-for-eclipse</artifactId>
@@ -9,18 +9,17 @@
<packaging>pom</packaging>
<properties>
- <scala.toolchain.version>2.8.0</scala.toolchain.version>
<scala.version>2.8.0</scala.version>
<tycho.version>0.9.0</tycho.version>
<maven.compiler.source>1.5</maven.compiler.source>
<maven.compiler.target>1.5</maven.compiler.target>
<encoding>UTF-8</encoding>
</properties>
-
+
<prerequisites>
<maven>3.0</maven>
</prerequisites>
-
+
<modules>
<module>../ch.epfl.lamp.sdt</module>
<module>../org.eclipse.contribution.weaving</module>
@@ -31,19 +30,6 @@
<module>../org.scala-ide.sdt.update-site</module>
</modules>
- <dependencies>
- <dependency>
- <groupId>org.scala-ide</groupId>
- <artifactId>org.scala-ide.scala.library</artifactId>
- <version>${scala.toolchain.version}</version>
- </dependency>
- <dependency>
- <groupId>org.scala-ide</groupId>
- <artifactId>org.scala-ide.scala.compiler</artifactId>
- <version>${scala.toolchain.version}</version>
- </dependency>
- </dependencies>
-
<build>
<sourceDirectory>${basedir}/src</sourceDirectory>
<testSourceDirectory>${basedir}/test</testSourceDirectory>
@@ -100,19 +86,6 @@
<snapshots><enabled>false</enabled></snapshots>
</repository>
<repository>
- <id>scala-refactoring</id>
- <name>Scala Refactoring p2 repository</name>
- <layout>p2</layout>
- <url>http://download.scala-ide.org/scala-refactoring</url>
- <snapshots><enabled>false</enabled></snapshots>
- </repository>
- <repository>
- <id>scalariform</id>
- <name>Scalariform's p2 repo</name>
- <layout>p2</layout>
- <url>http://download.scala-ide.org/scalariform</url>
- </repository>
- <repository>
<id>scala-tools.release</id>
<name>Scala Tools maven release repository</name>
<url>http://scala-tools.org/repo-releases</url>
@@ -142,5 +115,72 @@
<url>http://scala-tools.org/repo-releases</url>
<snapshots><enabled>false</enabled></snapshots>
</pluginRepository>
+ <pluginRepository>
+ <id>scala-tools.snapshot</id>
+ <name>Scala Tools maven snapshot repository</name>
+ <url>http://scala-tools.org/repo-snapshots</url>
+ </pluginRepository>
</pluginRepositories>
+ <profiles>
+ <profile>
+ <id>scala-2.8.0.final</id>
+ <activation>
+ <property>
+ <name>scala.version</name>
+ <value>2.8.0</value>
+ </property>
+ </activation>
+ <repositories>
+ <repository>
+ <id>scala-refactoring-2.8.0.final</id>
+ <name>Scala Refactoring Scala 2.8.0.final p2 repository</name>
+ <layout>p2</layout>
+ <url>http://download.scala-ide.org/scala-refactoring-2.8.0.final</url>
+ <snapshots><enabled>false</enabled></snapshots>
+ </repository>
+ <repository>
+ <id>scalariform-2.8.0.final</id>
+ <name>Scalariform Scala 2.8.0.final p2 repo</name>
+ <layout>p2</layout>
+ <url>http://download.scala-ide.org/scalariform-2.8.0.final</url>
+ </repository>
+ <repository>
+ <id>scala-toolchain-2.8.0.final</id>
+ <name>Scala Toolchain 2.8.0.final p2 repository</name>
+ <layout>p2</layout>
+ <url>http://download.scala-ide.org/scala-eclipse-toolchain-osgi-2.8.0.final</url>
+ </repository>
+ </repositories>
+ </profile>
+ <profile>
+ <id>scala-2.8.0.trunk</id>
+ <activation>
+ <property>
+ <name>scala.version</name>
+ <value>2.8.0-SNAPSHOT</value>
+ </property>
+ </activation>
+ <repositories>
+ <repository>
+ <id>scala-refactoring-trunk</id>
+ <name>Scala Refactoring Scala trunk p2 repository</name>
+ <layout>p2</layout>
+ <url>http://download.scala-ide.org/scala-refactoring-trunk</url>
+ <snapshots><enabled>false</enabled></snapshots>
+ </repository>
+ <repository>
+ <id>scalariform-trunk</id>
+ <name>Scalariform Scala trunk p2 repo</name>
+ <layout>p2</layout>
+ <url>http://download.scala-ide.org/scalariform-trunk</url>
+ </repository>
+ <repository>
+ <id>scala-toolchain-trunk</id>
+ <name>Scala Toolchain trunk p2 repository</name>
+ <layout>p2</layout>
+ <url>http://download.scala-ide.org/scala-eclipse-toolchain-osgi-trunk</url>
+ </repository>
+ </repositories>
+ </profile>
+ </profiles>
</project>
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-. $(dirname $0)/env.sh
-
-
-SCALA_TOOLCHAIN_VERSION=2.8.0
-${MAVEN} -f toolchain-pom.xml -N versions:set -DnewVersion=${SCALA_TOOLCHAIN_VERSION}
-${MAVEN} -f toolchain-pom.xml -N versions:update-child-modules
-
@@ -1 +1,2 @@
target
+pom.xml.versionsBackup
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.scala-ide</groupId>
<artifactId>scala-toolchain-for-eclipse</artifactId>
- <version>2.8.0</version>
- <relativePath>../org.scala-ide.build/toolchain-pom.xml</relativePath>
+ <version>2.8.0-SNAPSHOT</version>
+ <relativePath>../org.scala-ide.build-toolchain/pom.xml</relativePath>
</parent>
<artifactId>org.scala-ide.scala.compiler</artifactId>
<packaging>bundle</packaging>
@@ -19,20 +19,63 @@
<build>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.1</version>
+ <executions>
+ <execution>
+ <id>unpack</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.scala-lang</groupId>
+ <artifactId>scala-compiler</artifactId>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ <includes>compiler.properties</includes>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>properties-maven-plugin</artifactId>
+ <version>1.0-alpha-2</version>
+ <executions>
+ <execution>
+ <phase>initialize</phase>
+ <goals>
+ <goal>read-project-properties</goal>
+ </goals>
+ <configuration>
+ <files>
+ <file>${project.build.directory}/compiler.properties</file>
+ </files>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
+ <artifactId>maven-bundle-plugin</artifactId>
<version>2.1.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>org.scala-ide.scala.compiler</Bundle-SymbolicName>
<Bundle-Name>Scala Compiler for Eclipse</Bundle-Name>
+ <Bundle-Version>${version.number}</Bundle-Version>
<Embed-Dependency>*;scope=compile|runtime;inline=true</Embed-Dependency>
- <Export-Package>scala.tools.*;version=${scala.toolchain.version},ch.epfl.lamp.*;version=${scala.toolchain.version}</Export-Package>
+ <Export-Package>scala.tools.*;version=${version.number},ch.epfl.lamp.*;version=${version.number}</Export-Package>
<Import-Package>!jline,*</Import-Package>
</instructions>
</configuration>
- </plugin>
+ </plugin>
</plugins>
</build>
</project>
@@ -1 +1,2 @@
target
+pom.xml.versionsBackup
Oops, something went wrong. Retry.

0 comments on commit 63cc8a7

Please sign in to comment.