Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

changed POM to deal with building with certain dependencies (flavors)

and script that automatically builds selected combinations
  • Loading branch information...
commit b641b56c95aa09eacd15b4d732b0a76b27f9853e 1 parent 6bdaa11
Ivan Kuraj authored
Showing with 261 additions and 123 deletions.
  1. +38 −0 ch.epfl.insynth.build/ecosystem-build.sh
  2. +223 −123 ch.epfl.insynth.build/pom.xml
38 ch.epfl.insynth.build/ecosystem-build.sh
View
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# combinations of flavors to build
+ECLIPSE_FLAVORS=( "indigo" )
+SCALA_IDE_FLAVORS=( "dev-scala-ide-indigo-scala-2.9" )
+SCALA_FLAVORS=( "2.9.x" )
+
+# root dir (containing this script)
+ROOT_DIR=$(dirname $0)
+cd ${ROOT_DIR}
+ROOT_DIR=${PWD}
+#TARGET_DIR=/localhome/kuraj/temp/insynth-maven-build
+TARGET_DIR=/localhome/kuraj/Dropbox/Public/insynth
+
+for eclipse_flavor in "${ECLIPSE_FLAVORS[@]}"
+do
+for scala_ide_flavor in "${SCALA_IDE_FLAVORS[@]}"
+do
+for scala_flavor in "${SCALA_FLAVORS[@]}"
+do
+
+COMB="${eclipse_flavor}_${scala_ide_flavor}_${scala_flavor}"
+echo "Bulding InSynth for flavors ${eclipse_flavor} + ${scala_ide_flavor} + ${scala_flavor} into ${TARGET_DIR}/${COMB}"
+
+mvn -Pset-versions -P$eclipse_flavor -P$scala_ide_flavor -P$scala_flavor -Dtycho.style=maven --non-recursive exec:java
+
+mvn -Pset-versions -P$eclipse_flavor -P$scala_ide_flavor -P$scala_flavor clean package
+
+rm -rf ${TARGET_DIR}/$COMB
+mkdir -p ${TARGET_DIR}
+
+cp -r ${ROOT_DIR}/ch.epfl.insynth.update-site/target/site/ ${TARGET_DIR}/$COMB
+
+done
+done
+done
+
+exit
346 ch.epfl.insynth.build/pom.xml
View
@@ -22,105 +22,225 @@
<properties>
<encoding>UTF-8</encoding>
- <!-- p2 repositories location -->
- <repo.eclipse.indigo>http://download.eclipse.org/releases/indigo/</repo.eclipse.indigo>
- <repo.eclipse.juno>http://download.eclipse.org/eclipse/updates/4.2milestones</repo.eclipse.juno>
- <repo.ajdt.indigo>http://download.eclipse.org/tools/ajdt/37/dev/update</repo.ajdt.indigo>
<repo.scala-ide.root>http://download.scala-ide.org</repo.scala-ide.root>
+ <!-- InSynth -->
+ <insynth.library.name>Specify a profile!</insynth.library.name>
+ <insynth.library.version>1.0.0</insynth.library.version>
+
+ <!-- dependencies repos -->
+ <eclipse.codename>Specify a profile!</eclipse.codename>
+ <repo.eclipse>Specify a profile!</repo.eclipse>
+ <repo.ajdt>Specify a profile!</repo.ajdt>
+ <weaving.hook.plugin.version>Specify a profile!</weaving.hook.plugin.version>
+
+ <scala.version>Specify a profile!</scala.version>
+ <version.tag>local</version.tag>
+ <repo.scala-ide>Specify a profile!</repo.scala-ide>
+ <!-- repository is different for each profile -->
+
<!-- fixed versions -->
- <tycho.version>0.15.0</tycho.version>
+ <tycho.version>0.16.0</tycho.version>
<scala.plugin.version>3.0.2</scala.plugin.version>
+ <junit.version>4.10</junit.version>
<!-- tycho test related -->
- <tycho.test.OSspecific></tycho.test.OSspecific>
+ <tycho.test.OSspecific />
<!-- Partial workaround against JDT Weaving deadlocks. See #1000317 and
the original ticket on https://issuetracker.springsource.com/browse/STS-1445 -->
- <tycho.test.weaving>-XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Dosgi.classloader.lock=classname</tycho.test.weaving>
- <tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m -Dsdtcore.headless ${tycho.test.weaving} ${tycho.test.OSspecific}</tycho.test.jvmArgs>
-
- <!-- dependencies repos -->
- <repo.eclipse>${repo.eclipse.indigo}</repo.eclipse>
- <repo.ajdt>${repo.ajdt.indigo}</repo.ajdt>
+ <tycho.test.weaving>-XX:+UnlockDiagnosticVMOptions
+ -XX:+UnsyncloadClass -Dosgi.classloader.lock=classname</tycho.test.weaving>
+ <tycho.test.jvmArgs>-Xmx800m -XX:MaxPermSize=256m -Dsdtcore.headless
+ ${tycho.test.weaving} ${tycho.test.OSspecific}</tycho.test.jvmArgs>
- <!-- some default values, can be overwritten by profiles -->
- <insynth.library.name>ch.epfl.insynth.library.jar</insynth.library.name>
- <scala.version>2.9.3-SNAPSHOT</scala.version>
- <version.suffix>2_09</version.suffix>
- <scala.version.short>2.9</scala.version.short>
- <version.tag>local</version.tag>
- <repo.scala-ide>${repo.scala-ide.root}/releases-29/stable/site</repo.scala-ide>
- <scalacheck.id>scalacheck_2.9.0</scalacheck.id>
- <scalacheck.version>1.9</scalacheck.version>
- <scalatest.id>scalatest_2.9.0</scalatest.id>
- <scalatest.version>2.0.M1</scalatest.version>
- <specs.id>specs_2.9.0</specs.id>
- <specs.version>1.6.8</specs.version>
- <junit.version>4.10</junit.version>
- <mockito.version>1.9.0</mockito.version>
</properties>
<profiles>
+
<profile>
- <!-- this is the default profile, using the stable builds -->
- <id>scala-ide-2.0-scala-2.9</id>
+ <!-- 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.2.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>set-versions</id>
+ <goals>
+ <goal>java</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <classpathScope>compile</classpathScope>
+ <mainClass>org.scalaide.buildtools.UpdateAddonManifests</mainClass>
+ <arguments>
+ <argument>${repo.scala-ide}</argument>
+ </arguments>
+ </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>
+
<profile>
- <!-- 2.0.x Scala IDE with Scala 2.9 -->
- <id>scala-ide-2.0.x-scala-2.9</id>
+ <id>indigo</id>
<properties>
- <repo.scala-ide>${repo.scala-ide.root}/nightly-update-2-0-x-29x</repo.scala-ide>
+ <eclipse.codename>indigo</eclipse.codename>
+ <repo.eclipse>http://download.eclipse.org/releases/indigo/</repo.eclipse>
+ <repo.ajdt>http://download.eclipse.org/tools/ajdt/37/update</repo.ajdt>
+ <weaving.hook.plugin.version>1.0.200.I20120427-0800</weaving.hook.plugin.version>
</properties>
</profile>
<profile>
- <!-- nightly Scala IDE with Scala 2.9 -->
- <id>scala-ide-master-scala-2.9</id>
+ <id>juno</id>
<properties>
- <repo.scala-ide>${repo.scala-ide.root}/nightly-update-master-29x</repo.scala-ide>
+ <eclipse.codename>juno</eclipse.codename>
+ <repo.eclipse>http://download.eclipse.org/releases/juno/</repo.eclipse>
+ <repo.ajdt>http://download.eclipse.org/tools/ajdt/42/update</repo.ajdt>
+ <weaving.hook.plugin.version>1.0.200.v20120524-1707</weaving.hook.plugin.version>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>2.9.x</id>
+ <properties>
+ <scala.version>2.9.3-RC1</scala.version>
+ <version.suffix>2_09</version.suffix>
+ <scala.version.short>2.9</scala.version.short>
+ <insynth.library.name>ch.epfl.insynth.library.jar</insynth.library.name>
</properties>
+ <repositories>
+ <repository>
+ <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>
+
<profile>
- <!-- nightly Scala IDE with Scala trunk -->
- <id>scala-ide-master-scala-trunk</id>
- <properties>
- <scala.version>2.10.0-SNAPSHOT</scala.version>
- <version.suffix>2_10</version.suffix>
- <scala.version.short>2.10</scala.version.short>
- <repo.scala-ide>${repo.scala-ide.root}/nightly-update-master-trunk</repo.scala-ide>
- <!-- InSynth library built with Scala 2.10 -->
+ <id>2.10.x</id>
+ <properties>
+ <scala.version>2.10.0-RC5</scala.version>
+ <version.suffix>2_10</version.suffix>
+ <scala.version.short>2.10</scala.version.short>
<insynth.library.name>ch.epfl.insynth.library-2.10.jar</insynth.library.name>
- </properties>
+ </properties>
+ <repositories>
+ <repository>
+ <id>typesafe-ide</id>
+ <name>Typesafe IDE repository</name>
+ <url>http://repo.typesafe.com/typesafe/ide-2.10</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
</profile>
<profile>
- <!-- some configuration for tests run by tycho on Mac OS -->
- <id>macOs</id>
- <activation>
- <os>
- <family>mac</family>
- </os>
- </activation>
+ <id>next-dev-scala-ide-indigo-scala-2.9</id>
<properties>
- <tycho.test.OSspecific>-Dosgi.ws=cocoa -XstartOnFirstThread</tycho.test.OSspecific>
+ <repo.scala-ide>${repo.scala-ide.root}/sdk/next/e37/scala29/dev/base/</repo.scala-ide>
+ </properties>
+ </profile>
+ <profile>
+ <id>next-dev-scala-ide-indigo-scala-2.10</id>
+ <properties>
+ <repo.scala-ide>${repo.scala-ide.root}/sdk/next/e37/scala210/dev/base/</repo.scala-ide>
+ </properties>
+ </profile>
+ <profile>
+ <id>next-dev-scala-ide-juno-scala-2.9</id>
+ <properties>
+ <repo.scala-ide>${repo.scala-ide.root}/sdk/next/e38/scala29/dev/base/</repo.scala-ide>
+ </properties>
+ </profile>
+ <profile>
+ <id>next-dev-scala-ide-juno-scala-2.10</id>
+ <properties>
+ <repo.scala-ide>${repo.scala-ide.root}/sdk/next/e38/scala210/dev/base/</repo.scala-ide>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>dev-scala-ide-indigo-scala-2.9</id>
+ <properties>
+ <repo.scala-ide>${repo.scala-ide.root}/sdk/e37/scala29/dev/site/</repo.scala-ide>
+ </properties>
+ </profile>
+ <profile>
+ <id>dev-scala-ide-indigo-scala-2.10</id>
+ <properties>
+ <repo.scala-ide>${repo.scala-ide.root}/sdk/e37/scala210/dev/site/</repo.scala-ide>
+ </properties>
+ </profile>
+ <profile>
+ <id>dev-scala-ide-juno-scala-2.9</id>
+ <properties>
+ <repo.scala-ide>${repo.scala-ide.root}/sdk/e38/scala29/dev/site/</repo.scala-ide>
+ </properties>
+ </profile>
+ <profile>
+ <id>dev-scala-ide-juno-scala-2.10</id>
+ <properties>
+ <repo.scala-ide>${repo.scala-ide.root}/sdk/e38/scala210/dev/site/</repo.scala-ide>
+ </properties>
+ </profile>
+
+ <profile>
+ <!-- nightly Scala IDE with Scala 2.9 -->
+ <id>nightly-scala-ide-scala-2.9</id>
+ <properties>
+ <repo.scala-ide>${repo.scala-ide.root}/nightly-update-master-29x</repo.scala-ide>
+ <scala.version>2.9.3-SNAPSHOT</scala.version>
+ </properties>
+ </profile>
+ <profile>
+ <!-- nightly Scala IDE with Scala 2.10.0 -->
+ <id>nightly-scala-ide-scala-2.10.0</id>
+ <properties>
+ <repo.scala-ide>${repo.scala-ide.root}/nightly-update-master-2.10.0</repo.scala-ide>
+ </properties>
+ </profile>
+ <profile>
+ <!-- nightly Scala IDE for Eclipse Juno with Scala 2.9 -->
+ <id>nightly-scala-ide-juno-scala-2.9</id>
+ <properties>
+ <repo.scala-ide>${repo.scala-ide.root}/nightly-update-juno-master-29x</repo.scala-ide>
+ </properties>
+ </profile>
+ <profile>
+ <!-- nightly Scala IDE for Eclipse Juno with Scala 2.10.0 -->
+ <id>nightly-scala-ide-juno-master-scala-trunk</id>
+ <properties>
+ <repo.scala-ide>${repo.scala-ide.root}/nightly-update-juno-master-2.10.x</repo.scala-ide>
</properties>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <configuration>
- <dependencies>
- <dependency>
- <artifactId>org.eclipse.jdt.launching.macosx</artifactId>
- <type>eclipse-plugin</type>
- </dependency>
- </dependencies>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
</profile>
</profiles>
@@ -133,36 +253,10 @@
<dependencyManagement>
<dependencies>
<dependency>
- <groupId>org.scalatest</groupId>
- <artifactId>scalatest-finders_2.9.0</artifactId>
- <version>${scalatest-finders.version}</version>
- </dependency>
- <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>${mockito.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.scala-tools.testing</groupId>
- <artifactId>${scalacheck.id}</artifactId>
- <version>${scalacheck.version}</version>
- </dependency>
- <dependency>
- <groupId>org.scalatest</groupId>
- <artifactId>${scalatest.id}</artifactId>
- <version>${scalatest.version}</version>
- </dependency>
- <dependency>
- <groupId>org.scala-tools.testing</groupId>
- <artifactId>${specs.id}</artifactId>
- <version>${specs.version}</version>
- </dependency>
</dependencies>
</dependencyManagement>
@@ -193,8 +287,8 @@
</snapshots>
</repository>
<repository>
- <id>eclipse.indigo</id>
- <name>Eclipse Indigo p2 repository</name>
+ <id>eclipse.${eclipse.codename}</id>
+ <name>Eclipse p2 repository</name>
<layout>p2</layout>
<url>${repo.eclipse}</url>
<snapshots>
@@ -202,8 +296,8 @@
</snapshots>
</repository>
<repository>
- <id>ajdt.indigo</id>
- <name>AJDT for Eclipse Indigo p2 repository</name>
+ <id>ajdt.${eclipse.codename}</id>
+ <name>AJDT for Eclipse p2 repository</name>
<layout>p2</layout>
<url>${repo.ajdt}</url>
<snapshots>
@@ -233,7 +327,7 @@
<frameworkExtension>
<groupId>p2.osgi.bundle</groupId>
<artifactId>org.eclipse.equinox.weaving.hook</artifactId>
- <version>1.0.200.I20120427-0800</version>
+ <version>${weaving.hook.plugin.version}</version>
</frameworkExtension>
</frameworkExtensions>
<bundleStartLevel>
@@ -250,28 +344,6 @@
</pluginManagement>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-install-plugin</artifactId>
- <version>2.3.1</version>
- <inherited>false</inherited>
- <executions>
- <execution>
- <id>install-insynth-library</id>
- <phase>process-resources</phase>
- <goals>
- <goal>install-file</goal>
- </goals>
- <configuration>
- <file>ch.epfl.insynth.library/${insynth.library.name}</file>
- <groupId>ch.epfl</groupId>
- <artifactId>ch.epfl.insynth.library</artifactId>
- <version>1.0.0</version>
- <packaging>jar</packaging>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
@@ -342,6 +414,11 @@
<archiveSite>true</archiveSite>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-versions-plugin</artifactId>
+ <version>${tycho.version}</version>
+ </plugin>
<!-- plugin used to extract the git hash -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -361,6 +438,29 @@
<shortRevisionLength>7</shortRevisionLength>
</configuration>
</plugin>
+ <!-- install InSynth library jar -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>2.3.1</version>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <id>install-insynth-library</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>install-file</goal>
+ </goals>
+ <configuration>
+ <file>ch.epfl.insynth.library/${insynth.library.name}</file>
+ <groupId>ch.epfl</groupId>
+ <artifactId>ch.epfl.insynth.library</artifactId>
+ <version>${insynth.library.version}</version>
+ <packaging>jar</packaging>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
Please sign in to comment.
Something went wrong with that request. Please try again.