Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "WTP/Build/CBI Build"

< WTP‎ | Build
(Build)
 
(16 intermediate revisions by 5 users not shown)
Line 1: Line 1:
= WTP CBI Build =
+
This document describes how to build the various projects in Web Tools w/ Maven 3.5.
  
== Git clone the repo ==
+
For the most up to date, see build instructions, see also [http://git.eclipse.org/c/webtools/webtools.releng.aggregator.git/tree/README.adoc README].
  
The repo for WTP's aggregator can be found here:
+
 
 +
==Pre-requisites==
 +
 
 +
* git installed and configured to work with [[WTP_Gerrit_Access|gerrit]]
 +
* maven 3.5 installed and configured
 +
* JDK 1.8
 +
 
 +
 
 +
Note: for true completeness, you may also want to install JDK 1.4, 1.5, 1.6, 1.7, 1.8, 9, 10, 11, etc.
 +
 
 +
See section below about toolchains to enable these when building.
 +
 
 +
== Build a series of individual projects ==
 +
 
 +
Only care about building webtools.webservices? Now you don't have to rebuild everything upstream in WTP first!
 +
 
 +
See [http://git.eclipse.org/c/webtools/webtools.releng.aggregator.git/tree/README.adoc README]
 +
 
 +
== Build everything in one operation (DEPRECATED) ==
 +
 
 +
Maybe you DO want to build all 8 projects plus the releng stuff. Here's how.
 +
 
 +
See [http://git.eclipse.org/c/webtools/webtools.releng.aggregator.git/tree/README-deprecated.adoc README-deprecated]
 +
 
 +
=== Git clone the aggregator repo w/ submodules ===
 +
 
 +
The repo for WTP's aggregator can be viewed here:
  
 
     http://git.eclipse.org/c/webtools/webtools.releng.aggregator.git/
 
     http://git.eclipse.org/c/webtools/webtools.releng.aggregator.git/
  
You can git clone the repo by running:
+
You can clone the repo by running:
 
<pre>
 
<pre>
 
     git clone --recursive git://git.eclipse.org/gitroot/webtools/webtools.releng.aggregator.git
 
     git clone --recursive git://git.eclipse.org/gitroot/webtools/webtools.releng.aggregator.git
 
</pre>
 
</pre>
  
== Build WTP with CBI ==
+
==Individual Bundle Build==
 +
 
 +
Whichever approach used above, you can also build individual bundles instead of the whole project. This specially useful for committers to test the compilation of their components without going through the whole product build process. The <tt>CI</tt> profile will resolve your local changes against the latest CI builds of the upstream WTP projects. '''NOTE:''' It will also allow resolving against DOWNSTREAM WTP repos too, so be careful to not introduce circular dependencies!
 +
 
 +
* Navigate to the plugin or feature folder you want to build
 +
* Launch the individual build command:
 +
<pre>
 +
mvn -PCI clean verify
 +
</pre>
 +
 
 +
== Build WTP with Toolchains ==
 +
 
 +
If you want to run a build against old JDKs, here's how it's done in Jenkins.
  
 
=== Setup ===
 
=== Setup ===
  
In order to build WTP you are required to setup BREE libraries. This means configuring a toolchains.xml file in your ~/.m2/toolchains.xml file.
+
In order to build WTP you are required to setup [https://wiki.eclipse.org/Execution_Environments BREE] libraries. This means configuring a toolchains.xml file in your ~/.m2/toolchains.xml file.
  
 
Specifically for J2SE-1.4 you will require a copy of IBMJava2-142-SR13FP10.
 
Specifically for J2SE-1.4 you will require a copy of IBMJava2-142-SR13FP10.
Line 58: Line 96:
 
     <configuration>
 
     <configuration>
 
       <jdkHome>/opt/oracle/jdk1.7.0_25/jre</jdkHome>
 
       <jdkHome>/opt/oracle/jdk1.7.0_25/jre</jdkHome>
 +
    </configuration>
 +
  </toolchain>
 +
  <toolchain>
 +
    <type>jdk</type>
 +
    <provides>
 +
      <id>JavaSE-1.8</id>
 +
    </provides>
 +
    <configuration>
 +
      <jdkHome>/opt/oracle/jdk1.8.0_112/jre</jdkHome>
 
     </configuration>
 
     </configuration>
 
   </toolchain>
 
   </toolchain>
Line 65: Line 112:
 
=== Build ===
 
=== Build ===
  
To build WTP simply navigate to the directory where you cloned the repo and run:
+
To build using the above toolchains enabled, use:
  
 
<pre>
 
<pre>
Line 72: Line 119:
  
  
Note: Due to some current issues with JSF unit tests in WTP build. You need to tell Maven to ignore test failures by passing these parameters: -Dmaven.test.failure.ignore=true -Dmaven.test.error.ignore=true
+
====Modifying the Base Repository====
 +
The base repository is the place from where all the WTP dependencies for the individual build will be pulled, in case you want to test the build against a different base repository (by default, it is the latest Integration build which is refreshed together with each promotion):
 +
* Navigate to webtools.releng.aggregator/wtp-parent/pom.xml.
 +
* Look for <webtools.buildSite>
 +
* Update with the p2 repository you want to use as base.
 +
NOTE: It is expected that you use one of the online WTP p2 repositories, and those contain <strong>repository</strong> and <strong>repositoryunittests</strong> directories. So, if you want use a different one the <webtools.buildSite>,  <webtools.repository> and <webtools.testsRepository> must be updated accordingly.
 +
* Save the changes.
 +
 
 +
==References==
 +
* [http://git-scm.com/book/en/Getting-Started-Installing-Git Installing Git]
 +
* [http://maven.apache.org/download.cgi#Installation Installing Maven]

Latest revision as of 13:22, 7 July 2018

This document describes how to build the various projects in Web Tools w/ Maven 3.5.

For the most up to date, see build instructions, see also README.


Pre-requisites

  • git installed and configured to work with gerrit
  • maven 3.5 installed and configured
  • JDK 1.8


Note: for true completeness, you may also want to install JDK 1.4, 1.5, 1.6, 1.7, 1.8, 9, 10, 11, etc.

See section below about toolchains to enable these when building.

Build a series of individual projects

Only care about building webtools.webservices? Now you don't have to rebuild everything upstream in WTP first!

See README

Build everything in one operation (DEPRECATED)

Maybe you DO want to build all 8 projects plus the releng stuff. Here's how.

See README-deprecated

Git clone the aggregator repo w/ submodules

The repo for WTP's aggregator can be viewed here:

   http://git.eclipse.org/c/webtools/webtools.releng.aggregator.git/

You can clone the repo by running:

    git clone --recursive git://git.eclipse.org/gitroot/webtools/webtools.releng.aggregator.git

Individual Bundle Build

Whichever approach used above, you can also build individual bundles instead of the whole project. This specially useful for committers to test the compilation of their components without going through the whole product build process. The CI profile will resolve your local changes against the latest CI builds of the upstream WTP projects. NOTE: It will also allow resolving against DOWNSTREAM WTP repos too, so be careful to not introduce circular dependencies!

  • Navigate to the plugin or feature folder you want to build
  • Launch the individual build command:
mvn -PCI clean verify

Build WTP with Toolchains

If you want to run a build against old JDKs, here's how it's done in Jenkins.

Setup

In order to build WTP you are required to setup BREE libraries. This means configuring a toolchains.xml file in your ~/.m2/toolchains.xml file.

Specifically for J2SE-1.4 you will require a copy of IBMJava2-142-SR13FP10.

The one I'm using is as follows:

<toolchains>
  <toolchain>
    <type>jdk</type>
    <provides>
      <id>J2SE-1.4</id>
    </provides>
    <configuration>
      <jdkHome>/opt/ibm/IBMJava2-142-SR13FP10/jre</jdkHome>
    </configuration>
  </toolchain>
  <toolchain>
    <type>jdk</type>
    <provides>
      <id>J2SE-1.5</id>
    </provides>
    <configuration>
      <jdkHome>/opt/oracle/jdk1.5.0_22/jre</jdkHome>
    </configuration>
  </toolchain>
  <toolchain>
    <type>jdk</type>
    <provides>
      <id>JavaSE-1.6</id>
    </provides>
    <configuration>
      <jdkHome>/opt/oracle/jdk1.6.0_45/jre</jdkHome>
    </configuration>
  </toolchain>
  <toolchain>
    <type>jdk</type>
    <provides>
      <id>JavaSE-1.7</id>
    </provides>
    <configuration>
      <jdkHome>/opt/oracle/jdk1.7.0_25/jre</jdkHome>
    </configuration>
  </toolchain>
  <toolchain>
    <type>jdk</type>
    <provides>
      <id>JavaSE-1.8</id>
    </provides>
    <configuration>
      <jdkHome>/opt/oracle/jdk1.8.0_112/jre</jdkHome>
    </configuration>
  </toolchain>
</toolchains>

Build

To build using the above toolchains enabled, use:

    mvn clean verify -Pbree-libs


Modifying the Base Repository

The base repository is the place from where all the WTP dependencies for the individual build will be pulled, in case you want to test the build against a different base repository (by default, it is the latest Integration build which is refreshed together with each promotion):

  • Navigate to webtools.releng.aggregator/wtp-parent/pom.xml.
  • Look for <webtools.buildSite>
  • Update with the p2 repository you want to use as base.

NOTE: It is expected that you use one of the online WTP p2 repositories, and those contain repository and repositoryunittests directories. So, if you want use a different one the <webtools.buildSite>, <webtools.repository> and <webtools.testsRepository> must be updated accordingly.

  • Save the changes.

References

Copyright © Eclipse Foundation, Inc. All Rights Reserved.