Permalink
Browse files

Major refactoring of the maven build.

No bash script needed anymore. Everything is managed through maven.
The new pom at in root folder contains version information and general configuration.
org.scala-ide.build-toolchain is the root of the toolchain part
org.scala-ide.sbt.build is the root of the sdt part
The version numbers of some plugins has been upgraded

The downloaded libs have been moved to the target/lib folders, to simplify the clean up process.

The first time, run './build-all.sh (or './build-all.sh install -P scala-2.10.x' for 2.10) from the root to generate an initial build and install the top pom locally. Then use maven from any project or subproject.

Use the scala-2.10.x profile ('-P scala-2.10.x') to compile the 2.10 version.

Re #1001056
  • Loading branch information...
1 parent 0e901c7 commit bfc88fd04d80d68760e43dbe60b638c314280f0d @skyluc skyluc committed May 29, 2012
Showing with 1,212 additions and 1,576 deletions.
  1. +52 −0 build-all.sh
  2. +0 −1 org.scala-ide.build-toolchain/.gitignore
  3. +0 −29 org.scala-ide.build-toolchain/build-toolchain-2.9.x.sh
  4. +0 −27 org.scala-ide.build-toolchain/build-toolchain-trunk.sh
  5. +0 −40 org.scala-ide.build-toolchain/env.sh
  6. +4 −100 org.scala-ide.build-toolchain/pom.xml
  7. +0 −9 org.scala-ide.build/build-ide-2.9.x.sh
  8. +0 −10 org.scala-ide.build/build-ide-local-2.9.x.sh
  9. +0 −9 org.scala-ide.build/build-ide-local-trunk.sh
  10. +0 −9 org.scala-ide.build/build-ide-trunk.sh
  11. +0 −41 org.scala-ide.build/env.sh
  12. +0 −307 org.scala-ide.build/pom.xml
  13. +28 −28 org.scala-ide.sbt.full.library/.classpath
  14. +2 −0 org.scala-ide.sbt.full.library/.gitignore
  15. +23 −269 org.scala-ide.sbt.full.library/pom.xml
  16. +2 −1 org.scala-ide.scala.compiler/.classpath
  17. +0 −3 org.scala-ide.scala.compiler/.gitignore
  18. +26 −44 org.scala-ide.scala.compiler/pom.xml
  19. +3 −3 org.scala-ide.scala.library/.classpath
  20. +0 −3 org.scala-ide.scala.library/.gitignore
  21. +73 −170 org.scala-ide.scala.library/pom.xml
  22. +0 −1 org.scala-ide.sdt.aspects/.gitignore
  23. +2 −2 org.scala-ide.sdt.aspects/build.properties
  24. +5 −6 org.scala-ide.sdt.aspects/pom.xml
  25. 0 {org.scala-ide.build → org.scala-ide.sdt.build}/.gitignore
  26. 0 {org.scala-ide.build → org.scala-ide.sdt.build}/.project
  27. +357 −0 org.scala-ide.sdt.build/pom.xml
  28. 0 {org.scala-ide.build → org.scala-ide.sdt.build}/release-build-ide-2.9.sh
  29. +1 −1 org.scala-ide.sdt.core.tests/.classpath
  30. +0 −3 org.scala-ide.sdt.core.tests/.gitignore
  31. +1 −1 org.scala-ide.sdt.core.tests/META-INF/MANIFEST.MF
  32. +1 −1 org.scala-ide.sdt.core.tests/build.properties
  33. BIN org.scala-ide.sdt.core.tests/lib/mockito-all-1.8.5.jar
  34. +30 −103 org.scala-ide.sdt.core.tests/pom.xml
  35. +0 −1 org.scala-ide.sdt.core.tests/src/scala/tools/eclipse/EclipseUserSimulator.scala
  36. +0 −3 org.scala-ide.sdt.core/.gitignore
  37. +2 −2 org.scala-ide.sdt.core/META-INF/MANIFEST.MF
  38. +1 −1 org.scala-ide.sdt.core/build.properties
  39. +20 −95 org.scala-ide.sdt.core/pom.xml
  40. +1 −1 org.scala-ide.sdt.debug.tests/.classpath
  41. +0 −1 org.scala-ide.sdt.debug.tests/.gitignore
  42. +2 −1 org.scala-ide.sdt.debug.tests/META-INF/MANIFEST.MF
  43. +2 −3 org.scala-ide.sdt.debug.tests/build.properties
  44. +25 −112 org.scala-ide.sdt.debug.tests/pom.xml
  45. +11 −89 org.scala-ide.sdt.debug/pom.xml
  46. +1 −0 org.scala-ide.sdt.dev.feature/.gitignore
  47. +17 −0 org.scala-ide.sdt.dev.feature/.project
  48. +2 −0 org.scala-ide.sdt.dev.feature/build.properties
  49. +72 −0 org.scala-ide.sdt.dev.feature/feature.xml
  50. +13 −0 org.scala-ide.sdt.dev.feature/pom.xml
  51. +2 −2 org.scala-ide.sdt.feature/pom.xml
  52. +2 −2 org.scala-ide.sdt.source.feature/pom.xml
  53. +2 −2 org.scala-ide.sdt.update-site/pom.xml
  54. +4 −0 org.scala-ide.sdt.update-site/site.xml
  55. +2 −2 org.scala-ide.sdt.weaving.feature/pom.xml
  56. +0 −38 org.scala-ide/pom.xml
  57. +421 −0 pom.xml
View
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+# 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}
+
+if [ -z "$*" ]
+then
+ ARGS=install
+else
+ ARGS="$*"
+fi
+
+echo "Running with: mvn ${ARGS}"
+
+# the parent project
+cd ${ROOT_DIR}
+mvn ${ARGS}
+
+RES=$?
+if [ ${RES} != 0 ]
+then
+ exit ${RES}
+fi
+
+# the toolchain
+cd ${RUNNING_DIR}
+cd ${ROOT_DIR}/org.scala-ide.build-toolchain
+mvn ${ARGS}
+
+RES=$?
+if [ ${RES} != 0 ]
+then
+ exit ${RES}
+fi
+
+# the plugins
+cd ${RUNNING_DIR}
+cd ${ROOT_DIR}/org.scala-ide.sdt.build
+mvn ${ARGS}
+
+RES=$?
+if [ ${RES} != 0 ]
+then
+ exit ${RES}
+fi
+
@@ -1 +0,0 @@
-pom.xml.versionsBackup
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-. $(dirname $0)/env.sh
-
-# Scala compiler version to be used as a dependency
-SCALA_VERSION=2.9.3-SNAPSHOT
-
-# Scala library version
-SCALA_LIBRARY_VERSION=2.9.3-SNAPSHOT
-
-#THIS NEEDS TO BE UPDATED ONCE WE HAVE SNAPSHOTS
-
-# The precompiled compiler-interface.jar that SBT uses to communicate with scalac
-# This is usually the same as Scala version, and it is not enough to be just binary
-# compatible (compiler interface depends on scalac, not just std library)
-SCALA_PRECOMPILED=2_9_1
-
-# The scala version that was used to compile SBT dependencies (it is part of the artifact name)
-# It is usually enough to have a binary compatible version of SCALA_VERSION
-# For instance, here we can use 2.9.0, for a 2.9.1 compiler
-SBT_SCALA_VERSION=2.9.1
-
-SBINARY_VERSION=0.4.0
-
-set_version ${SCALA_VERSION}
-
-PROFILE="-P sbt-2.9"
-
-build $*
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-. $(dirname $0)/env.sh
-
-# Scala compiler version to be used as a dependency
-SCALA_VERSION=2.10.0-SNAPSHOT
-
-# Scala library version
-SCALA_LIBRARY_VERSION=2.10.0-SNAPSHOT
-
-# The precompiled compiler-interface.jar that SBT uses to communicate with scalac
-# This is usually the same as Scala version, and it is not enough to be just binary
-# compatible (compiler interface depends on scalac, not just std library)
-SCALA_PRECOMPILED=2_10_0-SNAPSHOT
-
-# The scala version that was used to compile SBT dependencies (it is part of the artifact name)
-# It is usually enough to have a binary compatible version of SCALA_VERSION
-# For instance, here we can use 2.9.0, for a 2.9.1 compiler
-SBT_SCALA_VERSION=2.10.0-SNAPSHOT
-
-SBINARY_VERSION=0.4.0
-
-set_version ${SCALA_VERSION}
-
-PROFILE="-P sbt-2.10"
-
-build $*
@@ -1,40 +0,0 @@
-# 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()
-{
- if [ -z $SCALA_LIBRARY_VERSION ]
- then
- echo "SCALA_LIBRARY_VERSION is undefined. Please specify a corresponding scala library for the scala compiler version ${SCALA_VERSION}"
- exit 1
- fi
-
- ${MAVEN} \
- -U \
- $PROFILE \
- -Dscala.version=${SCALA_VERSION} \
- -Dscala.library.version=${SCALA_LIBRARY_VERSION} \
- -Dsbt.scala.version=${SBT_SCALA_VERSION} \
- -Dsbinary.version=${SBINARY_VERSION} \
- -Dscala.precompiled.version=${SCALA_PRECOMPILED} \
- clean install $*
-}
-
@@ -4,113 +4,17 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.scala-ide</groupId>
- <artifactId>scala-ide-for-eclipse</artifactId>
- <version>1</version>
- <relativePath>../org.scala-ide/pom.xml</relativePath>
+ <artifactId>org.scala-ide.build</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
</parent>
- <artifactId>scala-toolchain-for-eclipse</artifactId>
- <version>2.9.3-SNAPSHOT</version>
- <name>The Scala Toolchain for Eclipse</name>
+ <artifactId>org.scala-ide.build-toolchain</artifactId>
+ <description>The Scala Toolchain for Scala Eclipse plugins</description>
<packaging>pom</packaging>
- <properties>
- <sbt.version>0.11.2-scalaide-08</sbt.version>
- <scala.compiler.groupid>org.scala-lang</scala.compiler.groupid>
- <scala.library.version>${scala.version}</scala.library.version>
- <scala.compiler.version>${scala.version}</scala.compiler.version>
- </properties>
-
<modules>
<module>../org.scala-ide.scala.library</module>
<module>../org.scala-ide.scala.compiler</module>
<module>../org.scala-ide.sbt.full.library</module>
</modules>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.scala-lang</groupId>
- <artifactId>scala-compiler</artifactId>
- <version>${scala.version}</version>
- </dependency>
- <dependency>
- <groupId>org.scala-lang</groupId>
- <artifactId>scala-library</artifactId>
- <version>${scala.library.version}</version>
- </dependency>
- <dependency>
- <groupId>org.scala-lang</groupId>
- <artifactId>scala-swing</artifactId>
- <version>${scala.library.version}</version>
- </dependency>
- <dependency>
- <groupId>org.scala-lang</groupId>
- <artifactId>scala-dbc</artifactId>
- <version>${scala.library.version}</version>
- </dependency>
- <dependency>
- <groupId>org.scala-lang</groupId>
- <artifactId>scala-actors</artifactId>
- <version>${scala.library.version}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.4.3</version>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.1</version>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- <profiles>
- <profile>
- <id>sbt-2.10</id>
- <properties>
- <version.suffix>2_10</version.suffix>
-
- <!-- Used as part of the artifact name for SBT cross-compiled modules. -->
- <scala.major.minor.version>${scala.version.short}</scala.major.minor.version>
-
- <!-- Used as part of the artifact name for SBT cross-compiled modules. -->
- <sbt.compiled.version>${sbt.scala.version}</sbt.compiled.version>
- </properties>
- <repositories>
- <repository>
- <id>typesafe-ide-2.10</id>
- <name>Typesafe IDE 2.10 repository</name>
- <url>http://repo.typesafe.com/typesafe/ide-2.10</url>
- </repository>
- </repositories>
- </profile>
-
- <profile>
- <id>sbt-2.9</id>
- <properties>
- <version.suffix>2_09</version.suffix>
- <scala.version.short>2.9</scala.version.short>
-
- <!-- Used as part of the directory name for compiler-interface.jar. -->
- <scala.major.minor.version>${scala.version.short}</scala.major.minor.version>
-
- <!-- Used as part of the artifact name for SBT cross-compiled modules. -->
- <sbt.compiled.version>${sbt.scala.version}</sbt.compiled.version>
- </properties>
- <repositories>
- <repository>
- <id>typesafe-ide-2.9</id>
- <name>Typesafe IDE 2.9 repository</name>
- <url>http://repo.typesafe.com/typesafe/ide-2.9</url>
- </repository>
- </repositories>
- </profile>
- </profiles>
</project>
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-. $(dirname $0)/env.sh
-
-SCALA_VERSION=2.9.3-SNAPSHOT
-
-PROFILE="-P scala-2.9.x"
-
-build $*
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-. $(dirname $0)/env.sh
-
-SCALA_VERSION=2.9.2-SNAPSHOT
-SCALA_LIBRARY_VERSION=2.9.1
-
-PROFILE_NAME="-P local-scala-2.9.x,!scala-trunk,!scala-2.9.2-SNAPSHOT"
-
-build $*
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-. $(dirname $0)/env.sh
-
-SCALA_VERSION=2.10.0-SNAPSHOT
-SCALA_LIBRARY_VERSION=2.10.0-SNAPSHOT
-PROFILE="-P local-scala-trunk,!scala-trunk"
-
-build $*
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-. $(dirname $0)/env.sh
-
-SCALA_VERSION=2.10.0-SNAPSHOT
-
-PROFILE="-P scala-trunk"
-
-build $*
View
@@ -1,41 +0,0 @@
-#!/bin/sh
-
-GIT_HASH="`git log -1 --pretty=format:"%h"`"
-# GIT_BRANCH="`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`"
-
-echo "git hash:" $GIT_HASH
-
-
-# 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
-
-if [ -z $VERSION_TAG ]
-then
- VERSION_TAG='local'
-fi
-
-echo "Version tag is $VERSION_TAG"
-
-build()
-{
-
- ${MAVEN} \
- $PROFILE -U \
- -Dscala.version=${SCALA_VERSION} \
- -Dscala.library.version=${SCALA_LIBRARY_VERSION} \
- -Dgit.hash=${GIT_HASH} \
- -Dversion.tag=${VERSION_TAG}\
- clean install $*
-}
Oops, something went wrong.

0 comments on commit bfc88fd

Please sign in to comment.