2d. Add list of (nested) modules to .aggregator pom.xml
- .aggregator module serves as composition
- pom.xml in root folder acts as main entry point to project and all-in-one build
- Order of list does not matter. Tycho determines order from OSGi
metadata
2e. Configure Tycho compiler
- Add debug symbols to .class files
- Treat input as being UTF-8 encoded
2f. Fight duplication by using properties
- Properties are a commonly used concept even in Maven itself
2g. Set Tycho compiler to build each bundle with a JDK that matches the
bundle's Bundle-RequiredExecutionEnvironment (BREE) defined in its OSGi
MANIFEST.MF
- Create a $user.home/.m2/toolchains.xml file that maps BREEs to (local)
JDKs
2h. Fix Maven warning about platform dependent build due to implicit
resource filter usage
- Explicitly set resource filter to be "UTF-8"
3a. Create a feature (project) named c.e.e4.rcp.todo.model.feature that
groups the functionality provided by the three bundles .model, .events
and .service
3b. Create pom.xml for feature with packaging type "eclipse-feature" and
add the feature to the aggregator pom in the root folder
- Again order in module list does not matter
- mvn install builds feature successfully
3c. Show what build.properties in features (as well as bundles) is used
for by including an (extra) README.txt file in the final feature
(build.properties is a (ancient) PDE build concept which is re-used by
Maven Tycho).
3d. Create second feature to group the UI parts of the RCP app
- Add poms to both bundles that make up the UI parts
- Add all three Maven modules to aggregator
3e. Declare feature inclusions and feature dependencies for
.todo.feature towards
- org.eclipse.* as dependencies
- com.example.e4.* as inclusion
3f. Switch to feature dependencies in .product
- Add required re-uses feature metadata to add all included and
dependent features to the product
3g. Externalize strings in feature metadata into feature.properties
files (OPTIONALLY)
- Do not forget to adapt build.properties to include new
feature.properties file
4a. Create a new (simple) project to contain the (p2) repository
- Add pom with (newly introduced) packaging type "eclipse-repository"
- mvn install fails with "[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-repository-plugin:0.18.1:assemble-repository (default-assemble-repository) on project com.example.e4.rcp.todo.repository: No content specified for p2 repository -> [Help 1]"
4b. Fix build failure by creating a "category.xml" file that defines the
content of the (p2) repository
- Refer to features (could refer to individual bundles too)
-- Categories logically group functionality, thus from the point of
abstraction categories > features > bundles
4c. Create self-contained (p2) repository by including all transitive
dependencies (meaning all third party dependencies)
- Shows that <build> configuration can also be used on the nested module
level and not just the parent pom
-- Properties as well (deduplication)
5a. Create yet another (simple) project named .target to contain a
target platform "eclipse4rcp.target"
- Target points to http://download.eclipse.org/eclipse/updates/4.3/
repository
- Target includes a list of (fundamental) features provided by Eclipse
Platform and EMF
5b. Create Maven/Tycho module to make .target known to Tycho
- pom packaging type is simply "pom"
- Use maven helper to attach a resource to the module. The resource is
the .target file
- Add to aggregator pom
5c. Use target platform in parent pom by configuring the
target-platform-configuration
- TPC refers to .target module
5d. Use new Tycho packaging type "eclipse-target-definition" instead of
simple "pom" available in 0.16
- .target file name has to be aligned with artifactId
- parent pom does not need the classifier anymore
5e. Provide a target platform for two different "baselines" (Kepler and Juno release)
- Uses Maven profiles to conditionally set properties based
-- Pass either via (system specific) ~/.m2/settings.xml or on cmd line with "-P profileName"