Skip to content

Commit

Permalink
Added support for builds relative to both Scala 2.8.0.final and Scala…
Browse files Browse the repository at this point in the history
… trunk.
  • Loading branch information
milessabin committed Aug 11, 2010
1 parent d50d5b1 commit 63cc8a7
Show file tree
Hide file tree
Showing 14 changed files with 278 additions and 130 deletions.
1 change: 1 addition & 0 deletions org.scala-ide.build-toolchain/.gitignore
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1 @@
pom.xml.versionsBackup
9 changes: 9 additions & 0 deletions org.scala-ide.build-toolchain/build-toolchain-release.sh
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

. $(dirname $0)/env.sh

SCALA_VERSION=2.8.0

set_version ${SCALA_VERSION}

build $*
9 changes: 9 additions & 0 deletions org.scala-ide.build-toolchain/build-toolchain-trunk.sh
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

. $(dirname $0)/env.sh

SCALA_VERSION=2.8.0-SNAPSHOT

set_version ${SCALA_VERSION}

build $*
29 changes: 29 additions & 0 deletions org.scala-ide.build-toolchain/env.sh
Original file line number Original file line Diff line number Diff line change
@@ -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 $*
}

Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.scala-ide</groupId> <groupId>org.scala-ide</groupId>
<artifactId>scala-toolchain-for-eclipse</artifactId> <artifactId>scala-toolchain-for-eclipse</artifactId>
<version>2.8.0</version> <version>2.8.0-SNAPSHOT</version>
<name>The Scala Toolchain for Eclipse</name> <name>The Scala Toolchain for Eclipse</name>
<packaging>pom</packaging> <packaging>pom</packaging>


<properties> <properties>
<scala.toolchain.version>2.8.0</scala.toolchain.version>
<scala.version>2.8.0</scala.version> <scala.version>2.8.0</scala.version>
<encoding>UTF-8</encoding> <encoding>UTF-8</encoding>
</properties> </properties>
Expand Down Expand Up @@ -48,6 +47,14 @@
<name>Scala Tools Maven2 Repository</name> <name>Scala Tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url> <url>http://scala-tools.org/repo-releases</url>
</repository> </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> </repositories>
<build> <build>
<pluginManagement> <pluginManagement>
Expand Down
4 changes: 1 addition & 3 deletions org.scala-ide.build/build-ide-release.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@


. $(dirname $0)/env.sh . $(dirname $0)/env.sh


SCALA_TOOLCHAIN_VERSION=2.8.0
SCALA_VERSION=2.8.0 SCALA_VERSION=2.8.0


set_toolchain_version ${SCALA_TOOLCHAIN_VERSION} build $*
build_both $*
7 changes: 2 additions & 5 deletions org.scala-ide.build/build-ide-trunk.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@


. $(dirname $0)/env.sh . $(dirname $0)/env.sh


SCALA_TOOLCHAIN_VERSION=2.8.0-trunk SCALA_VERSION=2.8.0-SNAPSHOT
SCALA_VERSION=2.8.0.trunk

set_toolchain_version ${SCALA_TOOLCHAIN_VERSION}
build_both $*


build $*
24 changes: 5 additions & 19 deletions org.scala-ide.build/env.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,24 +13,10 @@ if [ "X$MAVEN" = "X" ] ; then
exit exit
fi fi


set_toolchain_version() build()
{ {
${MAVEN} -f toolchain-pom.xml -N versions:set -DnewVersion=$1 ${MAVEN} \
${MAVEN} -f toolchain-pom.xml -N versions:update-child-modules -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 $*
}

100 changes: 70 additions & 30 deletions org.scala-ide.build/pom.xml
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?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" <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> <modelVersion>4.0.0</modelVersion>
<groupId>org.scala-ide</groupId> <groupId>org.scala-ide</groupId>
<artifactId>scala-ide-for-eclipse</artifactId> <artifactId>scala-ide-for-eclipse</artifactId>
Expand All @@ -9,18 +9,17 @@
<packaging>pom</packaging> <packaging>pom</packaging>


<properties> <properties>
<scala.toolchain.version>2.8.0</scala.toolchain.version>
<scala.version>2.8.0</scala.version> <scala.version>2.8.0</scala.version>
<tycho.version>0.9.0</tycho.version> <tycho.version>0.9.0</tycho.version>
<maven.compiler.source>1.5</maven.compiler.source> <maven.compiler.source>1.5</maven.compiler.source>
<maven.compiler.target>1.5</maven.compiler.target> <maven.compiler.target>1.5</maven.compiler.target>
<encoding>UTF-8</encoding> <encoding>UTF-8</encoding>
</properties> </properties>

<prerequisites> <prerequisites>
<maven>3.0</maven> <maven>3.0</maven>
</prerequisites> </prerequisites>

<modules> <modules>
<module>../ch.epfl.lamp.sdt</module> <module>../ch.epfl.lamp.sdt</module>
<module>../org.eclipse.contribution.weaving</module> <module>../org.eclipse.contribution.weaving</module>
Expand All @@ -31,19 +30,6 @@
<module>../org.scala-ide.sdt.update-site</module> <module>../org.scala-ide.sdt.update-site</module>
</modules> </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> <build>
<sourceDirectory>${basedir}/src</sourceDirectory> <sourceDirectory>${basedir}/src</sourceDirectory>
<testSourceDirectory>${basedir}/test</testSourceDirectory> <testSourceDirectory>${basedir}/test</testSourceDirectory>
Expand Down Expand Up @@ -99,19 +85,6 @@
<url>http://download.eclipse.org/tools/ajdt/35/dev/update</url> <url>http://download.eclipse.org/tools/ajdt/35/dev/update</url>
<snapshots><enabled>false</enabled></snapshots> <snapshots><enabled>false</enabled></snapshots>
</repository> </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> <repository>
<id>scala-tools.release</id> <id>scala-tools.release</id>
<name>Scala Tools maven release repository</name> <name>Scala Tools maven release repository</name>
Expand Down Expand Up @@ -142,5 +115,72 @@
<url>http://scala-tools.org/repo-releases</url> <url>http://scala-tools.org/repo-releases</url>
<snapshots><enabled>false</enabled></snapshots> <snapshots><enabled>false</enabled></snapshots>
</pluginRepository> </pluginRepository>
<pluginRepository>
<id>scala-tools.snapshot</id>
<name>Scala Tools maven snapshot repository</name>
<url>http://scala-tools.org/repo-snapshots</url>
</pluginRepository>
</pluginRepositories> </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> </project>
9 changes: 0 additions & 9 deletions org.scala-ide.build/update-ide-versions.sh

This file was deleted.

1 change: 1 addition & 0 deletions org.scala-ide.scala.compiler/.gitignore
Original file line number Original file line Diff line number Diff line change
@@ -1 +1,2 @@
target target
pom.xml.versionsBackup
55 changes: 49 additions & 6 deletions org.scala-ide.scala.compiler/pom.xml
Original file line number Original file line Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?> <?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" <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> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.scala-ide</groupId> <groupId>org.scala-ide</groupId>
<artifactId>scala-toolchain-for-eclipse</artifactId> <artifactId>scala-toolchain-for-eclipse</artifactId>
<version>2.8.0</version> <version>2.8.0-SNAPSHOT</version>
<relativePath>../org.scala-ide.build/toolchain-pom.xml</relativePath> <relativePath>../org.scala-ide.build-toolchain/pom.xml</relativePath>
</parent> </parent>
<artifactId>org.scala-ide.scala.compiler</artifactId> <artifactId>org.scala-ide.scala.compiler</artifactId>
<packaging>bundle</packaging> <packaging>bundle</packaging>
Expand All @@ -18,21 +18,64 @@
</dependencies> </dependencies>
<build> <build>
<plugins> <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> <plugin>
<groupId>org.apache.felix</groupId> <groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId> <artifactId>maven-bundle-plugin</artifactId>
<version>2.1.0</version> <version>2.1.0</version>
<extensions>true</extensions> <extensions>true</extensions>
<configuration> <configuration>
<instructions> <instructions>
<Bundle-SymbolicName>org.scala-ide.scala.compiler</Bundle-SymbolicName> <Bundle-SymbolicName>org.scala-ide.scala.compiler</Bundle-SymbolicName>
<Bundle-Name>Scala Compiler for Eclipse</Bundle-Name> <Bundle-Name>Scala Compiler for Eclipse</Bundle-Name>
<Bundle-Version>${version.number}</Bundle-Version>
<Embed-Dependency>*;scope=compile|runtime;inline=true</Embed-Dependency> <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> <Import-Package>!jline,*</Import-Package>
</instructions> </instructions>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
1 change: 1 addition & 0 deletions org.scala-ide.scala.library/.gitignore
Original file line number Original file line Diff line number Diff line change
@@ -1 +1,2 @@
target target
pom.xml.versionsBackup
Loading

0 comments on commit 63cc8a7

Please sign in to comment.