News and Notes from the Makers of Nexus | Sonatype Blog

Tycho 0.4.0 Roadmap

Written by Jason van Zyl | April 17, 2009

[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.

[hudson]: https://hudson.dev.java.net
[inst]: http://www.instantiations.com/
[kohsuke]: http://weblogs.java.net/blog/kohsuke/
[m2e]: http://m2eclipse.sonatype.org
[mark]: http://www.sonatype.com/people/author/mark/
[maven]: http://maven.apache.org
[nexus]: http://nexus.sonatype.org
[nxcm]: http://www.sonatype.com/nexus
[sat4j]: http://www.sat4j.org/
[sonatype]: http://www.sonatype.com
[webtide]: http://www.webtide.com
[wt]: http://www.instantiations.com/windowtester/index.html
[sgt]: https://issues.sonatype.org/browse/SGT
[atom]: http://www.sonatype.com/people/2009/04/how-to-convert-from-ant-to-maven-in-5-minutes/
[git]: http://git-scm.com/
[svn]: http://subversion.tigris.org/
[jgit]: http://www.eclipse.org/proposals/egit/
[scumd]: http://github.com/asynchrony/scumd/tree/master
[gerrit]: http://code.google.com/p/gerrit/
[sshd]: http://mina.apache.org/sshd/
[jpam]: http://jpam.sourceforge.net/
[issue]: https://issues.apache.org/jira/browse/DIRMINA-688
[jsw]: http://wrapper.tanukisoftware.org/doc/english/download.jsp
[jsecurity]: http://jsecurity.org
[tdev]: http://repository.sonatype.org/content/repositories/tycho-pseudo-releases/org/codehaus/tycho/tycho-distribution/0.4.0-DEV-2233/
[tmu]: mailto:tycho-users-subscribe@lists.sonatype.com
[tycho]: http://docs.codehaus.org/display/M2ECLIPSE/Tycho+project+overview
[plan]: http://docs.codehaus.org/display/M2ECLIPSE/Tycho+0.4.0+plan
## Main themes
* Better build target platform management ("TP" for short)
* Reducing JIRA backlog

## 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.

Let us know what you think!

[hudson]: https://hudson.dev.java.net
[inst]: http://www.instantiations.com/
[kohsuke]: http://weblogs.java.net/blog/kohsuke/
[m2e]: http://m2eclipse.sonatype.org
[mark]: http://www.sonatype.com/people/author/mark/
[maven]: http://maven.apache.org
[nexus]: http://nexus.sonatype.org
[nxcm]: http://www.sonatype.com/nexus
[sat4j]: http://www.sat4j.org/
[sonatype]: http://www.sonatype.com
[webtide]: http://www.webtide.com
[wt]: http://www.instantiations.com/windowtester/index.html
[sgt]: https://issues.sonatype.org/browse/SGT
[atom]: http://www.sonatype.com/people/2009/04/how-to-convert-from-ant-to-maven-in-5-minutes/
[git]: http://git-scm.com/
[svn]: http://subversion.tigris.org/
[jgit]: http://www.eclipse.org/proposals/egit/
[scumd]: http://github.com/asynchrony/scumd/tree/master
[gerrit]: http://code.google.com/p/gerrit/
[sshd]: http://mina.apache.org/sshd/
[jpam]: http://jpam.sourceforge.net/
[issue]: https://issues.apache.org/jira/browse/DIRMINA-688
[jsw]: http://wrapper.tanukisoftware.org/doc/english/download.jsp
[jsecurity]: http://jsecurity.org
[tdev]: http://repository.sonatype.org/content/repositories/tycho-pseudo-releases/org/codehaus/tycho/tycho-distribution/0.4.0-DEV-2233/
[tmu]: mailto:tycho-users-subscribe@lists.sonatype.com
[tycho]: http://docs.codehaus.org/display/M2ECLIPSE/Tycho+project+overview
[plan]: http://docs.codehaus.org/display/M2ECLIPSE/Tycho+0.4.0+plan