Sonatype Blog: Latest Posts

Tycho 0.4.0 Roadmap

[Tycho][tycho] is progressing very quickly and I just wanted folks to be aware of the roadmap that Igor has planned. Ultimately, we want Tycho to be a turnkey solution for doing Eclipse and OSGi development with Maven. You can find more about Tycho in the [overview][tycho] and we also have mailing lists you can subscribe to [here][tmu].

You can find the live roadmap [here][plan] and it’s below for your convenience.

## Specific new features and improvements
* In addition to Maven, ability to resolve TP from P2 repositories
* More ways to define TP, including implicit TP specification
* Allow different target runtime environments and/or conflicting dependencies for different reactor projects
* Build and test individual modules of multi-module project separately (assuming other modules were installed/deployed)
* Execute tests against different TPs

## Initial implementation thoughts
* Tycho will still perform dependency resolution in two steps
* First, TP content will be resolved and downloaded locally
* Then, OSGi resolver will be used to resolve project dependencies

* TP content resolution will be performed separately for each project. We may have to cache and/or reuse resolution results for performance reasons

* There will be three ways to define TP content
* explicitly, by pointing Tycho to local Eclipse installation (i.e., -Dtycho.targetPlatform=…)
* explicitly, by providing Tycho GAV of TP specification artifact
* implicitly, when TP content will be calculated based on project dependencies and optionally dependencyManagement (see below)

* Tycho will use P2 to resolve TP content, which has the following implications
* Tycho will need to provide implementations of P2 metadata/artifact repositories that understand Maven repository layout (see below)
* P2 installable unit (“IU” for short) metadata will be generated for all Tycho projects during TP content resolution
* Tycho will consider the following IU sources during TP content resolution
* # reactor projects
* # local maven repository
* # remote repositories
* P2 specific code will be hidden behind a facade object. This is necessary to overcome classloading issues (i.e. osgi vs plain java) but will allow Tycho to swithc to a different TP resolver relatively easily

### Maven repository layout for P2 metadata and artifacts
* Tycho will automatically generate P2 metadata for all projects and install/deploy it as artifacts with classifier=p2meta
* Tycho will generate and maintain “p2 index” of local Maven repository. It will also provide a tool to regenerate that index from cli
* For remote repositories, Tycho will use nexus-index to locate relevant artifacts
* This assumes index is up-to-date. TP content will be invalid during build-deploy-build if nexus index is not updated synchronously, for example
* This is less efficient than native P2 metadata, because Tycho will have to download metadata for individual artifacts one by one

### Implicit TP
By default, Tycho will use project dependencies to resolve TP content. That’s it, it will generate P2 metadata for each project, then it will invoke P2 resolver to calculate transitive dependencies.

To avoid uncertainty associated with use of dependency version ranges (very common for Eclipse projects), it will be possible to provide additional resolution constraints using dependencyManagement section of pom.xml file.

This will require less TP configuration than solution implemented in 0.3.0 and provide behaviour consistent with “regular” maven build.

### TP specification artifact
Implicit TP has two major limitations. 1) It is not possible to restrict “accidental” inclusion of artifacts in TP and 2) it is not possible to recreate TP outside of build context.

To overcome these limitations, Tycho will support explicitly defined TP. Exact specification format is to be defined, but it will at least contain information about root IUs and target runtime environments. It will likely allow references to other TP specification artifacts, i.e. “include everything included in that other TP” scenario.