Skip to content

Instantly share code, notes, and snippets.

@jvanzyl
Created August 25, 2010 16:41
Show Gist options
  • Save jvanzyl/549823 to your computer and use it in GitHub Desktop.
Save jvanzyl/549823 to your computer and use it in GitHub Desktop.
Sonatype has developing an open source tool called Tycho to help people manage OSGi and Eclipse builds with Maven. JBoss Tools is currently the largest OSS codebase to migrate Tycho to build a set of Eclipse plugins.
For more information about using Tycho, see the Tycho project site's helpful guide <a title="How to Create a New OSGI Bundle" href="http://tycho.sonatype.org/how-to-create-a-new-osgi-bundle.html">How to Create a New OSGi Bundle</a>
Nick Boldt
* IRC assistance in #maven
* mailing list well trafficked and watched
* frequent releases
* fairly recent/up to date docs (though I could point to things I think are missing if you'd like, such as examples of product and source builds)
* dynamic target platform resolution/provisioning using MANIFEST.MF and feature.xml files in project sources
* static target platform resolution/provisioning using .target or existing Eclipse install
* fairly coherent error messages when things go awry (generally solved by fixing pom.xml or manifest.mf)
* minimal duplication of meta content (manifest.mf vs. pom.xml)
* easy(ish) ways to extend build process w/ ant scripts, maven plugins
* built-in support for JUnit 4 and SWTBot (unlike PDE, which requires black magic)
* ability to easily turn on/off tests
* creation of p2 update sites from TWO FILES (a pom.xml + a site.xml)
* ability to run build commandline, in eclipse (w/ m2eclipse), or in Hudson (two ways)
* profiles & variables to control builds, eg., to have things flow differently in Hudson vs. commandline
* bootstrapping/publishing w/ maven wagons (though I haven't managed to get that to work very well yet)
* publishing to nexus/m2 repos (also not working yet)
Miles Sabin
I gave you a brief plug here,
http://www.scala-ide.org/2010/08/not-a-release-but-new-and-noteworthy-even-so/
I'm not really sure what to add. The big wins for us were without
question target platform management and automation of the bundle,
feature and update site build processes. I was pleasantly surprised to
find that the Tycho/Maven combination was flexible enough that none of
the not-quite-vanilla aspects of our build were problematic (eg.
extracting a build number from a properties file embedded in a .jar
and using that as a component of an OSGi bundle version number).
Jan Sievers
Hi Jason,
I talked to the guys and here is some feedback about the migration of memory analyzer build to tycho:
https://build.eclipse.org/hudson/view/Tycho%20+%20Maven/job/tycho-mat-nightly/
pros:
- pom generation considered useful as a quick start for migration
- findbugs easily enabled on hudson as added benefit after migration was done
- generally open up the build to the wealth of additional plugins from the maven ecosystem out there
- running JUnit tests in OSGi runtime comes out of the box
- OSGi package visibility rules respected for compilation
- in general if it worked with PDE headless build, it also works with tycho (at least for the straightforward 95% case)
cons:
- generally missing or outdated documentation
- all 3rd party dependencies not available in public p2 repo yet had to be manually/scripted put into a p2 repo first as described on
https://docs.sonatype.org/display/TYCHO/How+to+make+existing+OSGi+bundles+consumable+by+Tycho , this lead to duplicated shell/bat scripts in hudson job to run build both on windows and linux
- p2 updatable products and additional root files in eclipse installation not properly supported yet (this will be fixed for 0.10.0 I guess, https://issues.sonatype.org/browse/TYCHO-188 )
- corrupted downloads from p2 (due to slow/fragile connection) sometimes lead to corrupted cache, error handling should be more robust here => delete local repo is the only remedy (https://issues.sonatype.org/browse/TYCHO-359 touches on this one)
- target platform handling: using .target files or repositories with layout p2: not obvious which approach should be used, missing docs/best practices
- junit 3 vs 4 test execution problem (https://issues.sonatype.org/browse/TYCHO-360 fixed in the meantime)
- they wanted to set some system props/JVM args for test execution => had to go into tycho sources to find how to do it
Thanks to SAP for being a very big help with Tycho. As a mentors to the project at #Eclipse and for contributing a lot of code!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment