Running the build
Some of Tycho components (namely, tycho-p2-app and tycho-surefire-*) are Eclipse/PDE projects and hence require Tycho to build. To accommodate this, Tycho build is split into two stages, first, core of Tycho functionality is built using regular maven, then full Tycho distribution is built using bootstrap Tycho version produced during the first stage.
This bootstrap logic is codified in bootstrap.sh shell script located in the root of Tycho source tree.
Bootstrap build prerequisites
- Maven 3.0-TYCHO-733848 or newer
- Eclipse 3.5M7 with RCP Delta Pack
- Java 1.5.0 or better JDK (has to be JDK, JRE is not enough)
The following environment variables define locations where bootstrap.sh looks for prerequisites.
M2_HOME is location of maven installation used in the first stage of Tycho build.
TYCHO_TARGET_PLATFORM is location of Eclipse 3.5M7 with RCP Delta pack.
Depending on your operating system configuration, you may also need to set JAVA_HOME.
The commands
export M2_HOME=/opt/apache-maven-3.0-TYCHO-733848 export TYCHO_TARGET_PLATFORM=/opt/eclipse-3.4.1-rcp/eclipse export JAVA_HOME=/opt/ibm-java2-x86_64-50 ./bootstrap.sh
Really cold bootstrap
Tycho depends on two eclipse.org jar files – org.eclipse.osgi and org.eclipse.jdt.core. These two jar files are deployed to sonatype public repository and are available from via public group 1, so these steps are only necessary if you want to build Tycho without access to Sonatype repositories.
Note that this is just an example. You will need to use actual versions of artifacts you install/deploy.
To install the two jars to local maven repository
mvn install:install-file -Dfile=org.eclipse.osgi_3.4.0.v20080605-1900.jar \ -DgroupId=org.eclipse -DartifactId=org.eclipse.osgi -Dversion=3.4.0.v20080605-1900 \ -Dpackaging=jar -DgeneratePom=true mvn install:install-file -Dfile=org.eclipse.jdt.core_3.4.0.v_874.jar \ -DgroupId=org.eclipse -DartifactId=org.eclipse.jdt.core -Dversion=3.4.0.v_874 \ -Dpackaging=jar -DgeneratePom=true
To deploy the two jars to sonatype repository (assuming you have access)
mvn deploy:deploy-file -Dfile=org.eclipse.osgi_3.4.0.v20080605-1900.jar \ -DgroupId=org.eclipse -DartifactId=org.eclipse.osgi -Dversion=3.4.0.v20080605-1900 \ -Dpackaging=jar -DgeneratePom=true \ -DrepositoryId=forge-releases -Durl=http://repository.sonatype.org:8081/nexus/content/repositories/eclipse mvn deploy:deploy-file -Dfile=org.eclipse.jdt.core_3.4.0.v_874.jar \ -DgroupId=org.eclipse -DartifactId=org.eclipse.jdt.core -Dversion=3.4.0.v_874 \ -Dpackaging=jar -DgeneratePom=true \ -DrepositoryId=forge-releases -Durl=http://repository.sonatype.org:8081/nexus/content/repositories/eclipse