Tycho Build Extension
The tycho-build
Maven extension is a core component of Tycho that enables advanced build capabilities including pomless builds, enhanced dependency resolution, and CI-friendly versioning.
What does the tycho-build extension do?
The tycho-build
extension provides the following key features:
- Pomless Build Support: Enables building Eclipse/OSGi projects and BND workspaces without requiring a
pom.xml
file in every module - Enhanced Dependency Graph Building: Optimizes the Maven reactor build order based on Eclipse/OSGi dependencies
- CI-Friendly Versioning: Supports enhanced version properties for continuous integration workflows
- Smart Builder Integration: Automatically enables the Maven smart builder for parallel builds when appropriate
When should you use the tycho-build extension?
You should use the tycho-build
extension when:
- You want to use pomless builds for Eclipse plugins, features, products, or BND projects
- You want to leverage Tycho CI-friendly versioning with dynamic qualifiers
- You are building a project with a structured build layout and want to minimize Maven configuration
How to enable the tycho-build extension
To enable the tycho-build
extension in your project:
-
Create a
.mvn
folder in the root of your project (the multi-module project directory) -
Create a file called
extensions.xml
inside the.mvn
folder with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<extensions>
<extension>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-build</artifactId>
<version>${tycho-version}</version>
</extension>
</extensions>
- Create a file called
maven.config
in the.mvn
folder to define the Tycho version:
-Dtycho-version=4.0.10
Make sure to adjust the version to match the latest Tycho release.
What happens when the extension is loaded?
When Maven starts, the tycho-build
extension is loaded before the build begins. It:
- Registers polyglot Maven mappings that allow Tycho to read Eclipse/OSGi metadata (MANIFEST.MF, feature.xml, *.product, etc.) and BND configuration files (bnd.bnd, *.bndrun) as Maven models
- Provides a custom dependency graph builder that understands Eclipse/OSGi dependencies
- Enables advanced features like build timestamp providers and CI-friendly version properties
Related Documentation
- Structured Build Layout and Pomless Builds - Learn how to use pomless builds with Eclipse plugin projects
- BND Workspace and Pomless Builds - Learn how to build BND workspaces with Tycho
- Tycho CI Friendly Versions - Learn about enhanced versioning capabilities
Examples
You can find working examples of projects using the tycho-build
extension in the Tycho repository:
Migration from tycho-pomless
If you are currently using the older org.eclipse.tycho.extras:tycho-pomless
extension, you should migrate to org.eclipse.tycho:tycho-build
. Simply update your .mvn/extensions.xml
file to reference the new extension as shown above. The tycho-pomless
extension is deprecated and will be removed in a future version of Tycho.