Skip to content

Commit

Permalink
Merge pull request #207 from skyluc/build/version_numbers_m2
Browse files Browse the repository at this point in the history
Added a profile to set the scala versions
  • Loading branch information
dragos committed Oct 10, 2012
2 parents 4d78173 + e986f0c commit 971e8a4
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 14 deletions.
29 changes: 15 additions & 14 deletions build-all.sh
Expand Up @@ -2,12 +2,11 @@

# run in sequences the different maven calls needed to fully build Scala IDE from scratch


#ROOT_DIR=$(dirname $(readlink -f $0))
# not as good as the readlink version, but it is not working on os X
ROOT_DIR=$(dirname $0)

RUNNING_DIR=${PWD}
cd ${ROOT_DIR}
ROOT_DIR=${PWD}

if [ -z "$*" ]
then
Expand All @@ -18,8 +17,8 @@ fi

echo "Running with: mvn ${ARGS}"

# the parent project
cd ${ROOT_DIR}
# the toolchain
cd ${ROOT_DIR}/org.scala-ide.build-toolchain
mvn ${ARGS}

RES=$?
Expand All @@ -28,19 +27,21 @@ then
exit ${RES}
fi

# the toolchain
cd ${RUNNING_DIR}
cd ${ROOT_DIR}/org.scala-ide.build-toolchain
mvn ${ARGS}

RES=$?
if [ ${RES} != 0 ]
# set the versions if required
cd ${ROOT_DIR}
if [ -n "${SET_VERSIONS}" ]
then
exit ${RES}
mvn -Pset-versions exec:java
RES=$?
if [ ${RES} != 0 ]
then
exit ${RES}
fi
else
echo "Not running UpdateScalaIDEManifests."
fi

# the plugins
cd ${RUNNING_DIR}
cd ${ROOT_DIR}/org.scala-ide.sdt.build
mvn ${ARGS}

Expand Down
43 changes: 43 additions & 0 deletions pom.xml
Expand Up @@ -146,6 +146,49 @@
</pluginManagement>
</build>
</profile>

<profile>
<!-- pull the data needed to add the version numbers to the manifests -->
<id>set-versions</id>
<dependencies>
<dependency>
<groupId>org.scala-ide</groupId>
<artifactId>build-tools_2.9.2</artifactId>
<version>0.1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>copy.reflect</id>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<classpathScope>compile</classpathScope>
<mainClass>org.scalaide.buildtools.UpdateScalaIDEManifests</mainClass>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<!-- extra repository containing the build package -->
<id>typesafe-ide</id>
<name>Typesafe IDE repository</name>
<url>http://repo.typesafe.com/typesafe/ide-2.9</url>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
</profile>

</profiles>

<repositories>
Expand Down

0 comments on commit 971e8a4

Please sign in to comment.