Tycho: Building Eclipse plugins with Maven
As part of the Eclipse Live series of webinars, Sonatype software developer Pascal Rapicault is giving a presentation on Tycho: Building Eclipse plugins with Maven.
About the webinar:
Tycho is a set of Maven plugins and extensions for building Eclipse plugins and OSGI bundles with Maven. Eclipse plugins and OSGI bundles have their own metadata for expressing dependencies, source folder locations, etc. that are normally found in a Maven POM. Tycho uses native metadata for Eclipse plugins and OSGi bundles and uses the POM to configure and drive the build. Tycho supports bundles, fragments, features, update site projects and RCP applications. Tycho also knows how to run JUnit test plugins using OSGi runtime and there is also support for sharing build results using Maven artifact repositories.
Join this webinar to get an overview of the Tycho project and to learn what plans the project has for the future.
- Date: May 3, 2011
- Time: 9:00 am PST / 12:00 pm EST / 4:00 pm UTC / 6:00 pm CET
- Length: 60 minutes
- Enroll here!
How to build a RAP application with Tycho
Holger Staudacher, at EclipseSource, has a good writeup of his experience evaluating Tycho for the Runtime Packaging Project (RTP). Here’s an excerpt of what he has to say:
Recently I played around a little with Tycho because we evaluated it for the use in the RTP project. As a test case, I decided to try to build a RAP application with Tycho. With building I mean compiling and packaging the artifacts into a WAR file in order to deploy them on a Tomcat or another Servlet Container. I have to say that I’m really impressed with Tycho. Before this experience…
It’s great to see different projects trying Tycho at the Eclipse Foundation: having standard recipes for building RAP applications would be extremely useful addition for the community. RAP is not something that Sonatype is directly involved with so it’s great to get this varied perspective, and different applications types so we can make sure Tycho will work for as many use cases as possible. Thanks Holger!
Holger has some good examples at Github, and you can find his original blog entry here.
We are currently working on submitting the CQs for Tycho so we can move the project over to the Eclipse Foundation. I think Wayne Beaton said he wanted to help with those CQs. Right Wayne?
Maven IDE: The year of Maven & Eclipse
There are many things we would like to see accomplished in the Apache Maven ecosystem in 2011 but one of the most important, we feel, is the sound integration of Maven with Eclipse. A great deal of effort was spent bringing Maven 3.x up to the level where it can be leveraged for an effective integration with Eclipse. With Maven 3.0 released in 2010 we are in a position to focus on the Eclipse side of the equation. For those you who watch the M2Eclipse JIRA you can see a great deal of activity and that’s because Sonatype’s M2Eclipse team is doing for M2Eclipse what Sonatype’s Maven team did for Maven 3.0. Sonatype is working on the internal architecture of M2Eclipse, adding tests, and preparing the path forward which means the integration of Maven with the rest of the Eclipse ecosystem.
Sonatype is investing heavily to ensure the baseline M2Eclipse 1.0 is of high quality, stable, and maintainable. With the help of the amazing IP team at the Eclipse Foundation M2Eclipse has passed its initial IP review, has entered the parallel IP process and is slated to be released as part of the 2011 Indigo release of Eclipse. To be certain, this will be a great milestone for the Maven and Eclipse ecosystems: users have been asking for years to have good Maven integration included in the standard Eclipse distributions and this will be the year they get it. Indigo will ship this year on June 22nd, but in the meantime Sonatype will be working on and soon releasing Maven IDE!

What is Maven IDE exactly? Maven IDE is a Maven-focused distribution of Eclipse that will consist of a base Eclipse distribution, M2Eclipse and a series of Maven-focused integrations where there is strong support within the Maven and Eclipse ecosystems. What are some of the things we are looking at potentially integrating?
Frameworks and languages
JSR-330 & Guice integration: JSR-330 & Guice are now critical to the Maven ecosystem and very important to Sonatype as a technology. The JSR-330 implementation provided by Guice provides core functionality for Maven 3.x, Nexus, M2Eclipse, and Sonatype’s Maven 3.x integration for Hudson. We will create tooling for JSR-330 to help with our own work, general integration work for development infrastructures, and anyone using JSR-330.
Webapp development tooling: Webapp development is the most requested form of integration and we are still evaluating what’s available in WTP versus making something that is simpler and integrates more tightly with Maven. For those that don’t know, the WTP integration for M2Eclipse is not part of the codebase that moved to Eclipse. Sonatype will be working with the community on the M2Eclipse/WTP integration and will help distribute it from Sonatype, but we are also looking at alternatives to WTP.
Tycho integration: We already have support for Tycho inside Eclipse that allows Tycho projects to interoperate with PDE at a rudimentary level, but we would like to improve this integration and bring support for Tycho-based projects into the Eclipse IDE.
Maven Shell integration: This is where the Maven command line will intersect with the IDE. We see in the future being JSR-330 component based so we can leverage them from the Maven Shell and Maven IDE, and these components will participate in long-lived workflows that aid in the development of applications. We plan to use Drools Flow for the workflow implementation and the Eclipse tooling that exists for Drools Flow. The workflows will be accessible and usable from the Maven Shell as well as from within Maven IDE.
Polyglot Maven integration: For some of the selected grammars and dialects of Polyglot Maven we will provide support in Maven IDE. The folks at Itemis have been a great in helping us understand how Xtext can play a critical role in this regard. If a grammar can be represented in a form that Xtext understands then much of the plumbing for powerful editors can be created automatically using the Xtext framework. There are currently some integration issues between standard Maven and OSGi that need to be resolved but Xtext is an incredibly powerful language workbench. The Itemis guys have really done some incredible work.
Android development tooling: Android is becoming very popular and has a strong Maven contingent. There are sophisticated Maven-based tools for developing Android apps that have been created by Android community: the maven-android-plugin by Hugo Josefson from Jayway, the Eclipse integration exists as part of what Google provides, and Ricardo Gladwell has created the bridge between Maven and Eclipse with his Android M2Eclipse integration.
Scala IDE: Miles Sabin is creating great Eclipse integration for Scala with his Scala IDE project and David Bernard is bridging that work into Maven m2eclipse-scala. We are seeing a lot of demand for Scala integration with Maven.
GWT integration: GWT has rapidly become one of the standard webapp toolkits for Java and we’ve seen a lot of demand for better integration with M2Eclipse. Within the realm of development infrastructure GWT is very popular. Sonar uses GWT, Gerrit uses GWT, XWiki uses GWT, and Sonatype has chosen GWT as the basis of the UI for our Maven 3.x integration in Hudson. GWT will continue to gain momentum so it’s very likely we will have more sophisticated integration with M2Eclipse sooner rather then later.
Development infrastructure
Sonar integration: Sonar is becoming the de facto standard reporting and quality system for Java projects. Sonar is very Maven-centric and SonarSource has provided Eclipse integration that can easily be integrated with Maven IDE.
Hudson integration: Hudson is the de facto standard continuous integration server for Java projects. Sonatype is currently working on finishing our Maven 3.x integration and it will be integrated within Maven IDE.
Wiki editing & site publishing: Sonatype has a wiki page editing and publishing framework called Idiom — that is based on the WikiModel project — that we will be open sourcing, and hopefully merging with the tools that exist in the WikiText project at Eclipse. Ultimately we would like to see WikiModel merged with WikiText and then work together within the community to make great editing tools. If WikiModel could be wed with Xtext it would be amazing.
SVN integration: Obviously important and we initially removed the SVN support to clean up and focus on the core. We’re layering it back in as resources permit. It’s not going anywhere and there are actually two options now. Sonatype supports the Subversive integration which is the official SVN integration at Eclipse, but the community has contributed the Subclipse support. So both variants will be available and Maven IDE will ship with the Java-based SVNKit connector.
Git integration: Git is sweeping over the development community and has taken off like wildfire. At Sonatype we use Git for the vast majority of our projects so great Git integration with Eclilpse and Maven is vital.
Maven Central statistics and metadata: Many OSS projects have been thrilled with the statistics we’ve provided them and we’ll be working in the future to provide more value from the information in Maven Central and deliver it into Maven IDE. Maven Central is an unparalleled source of interesting and useful information for developers and we want to make all that information more accessible.
So you can see that the number of paths we can potentially take are limitless. What will really help us limit our choices are the partners we find who are as committed as we are to the Maven and Eclipse ecosystems. We’re not interested in individuals, groups, or organizations that are hedging their bets with Maven and Eclipse. We are looking for individuals, groups, and organizations who are committed to the Eclipse Platform and Maven as the basis of their development infrastructures.
Things we’ll be looking for in integration partners, are: Tycho build, good test infrastructure, and a composite p2 repository for integration. Maven IDE will first be available in an OSS community edition and will be followed by future commercial versions. We are excited about building out a polished, Maven-focused distribution of Eclipse and we’re really looking for feedback from the community about what integrations to pursue first. So please let us know!
Apache and Apache Maven are trademarks of the Apache Software Foundation. Maven Central is a service mark of Sonatype, Inc. Nexus, Maven IDE, Maven Shell, and Polyglot Maven are trademarks of Sonatype, Inc. Maven Central, Maven IDE, Maven Shell, and Polyglot Maven are intended to complement Apache Maven and should not be confused with Apache Maven.
Apache Maven 3.0 has landed!
Apache Maven 3.0 has landed, but it’s really just the beginning. The work that Sonatype has done to bring Maven 3.0 to fruition is substantial. It’s been hard, it’s taken a lot of Sonatype’s time and resources, but we’re glad we did the work and we see this as a new beginning for Maven. We will, of course, keep working on Maven but with the release of Maven 3.0 Sonatype will, at least for a little while, turn an eye to Maven’s Eclipse-focused cousins, the Maven Shell, Polyglot Maven, and Hudson.
We have work to do on Tycho to get it fully setup for the parallel IP process at Eclipse, we will soon start a very intensive set of iterations to bring the M2Eclipse core to a 1.0 state, and we have committed within Sonatype to move M2Eclipse to the Eclipse Foundation. The M2Eclipse project at Eclipse has been in suspended animation for a while but we plan to work toward getting M2Eclipse into the release train and have Indigo be the first Eclipse distribution to ship with Maven capabilities. Tycho and M2Eclipse will also be a lot of work, but I think Sonatype has demonstrated that we’re committed to making these projects work and can deliver as we’ve shown with Maven 3.0.
There will be a release fairly soon of the Maven Shell, I will be starting a new phase of work on Polyglot Maven, and I’ll also be talking about concretely what Sonatype plans to do around Hudson — and what we’ve already done. Once we get a few more of the projects we’re working on to a healthy state we will begin the dialog with the community about what features users are looking for in future versions of Maven and related tools.
The Maven community owes a special thanks to Benjamin Bentmann, who has worked consistently and persistently for a long time on Maven 3.0. He has been amazingly responsive in applying fixes for reported issues, and has set the bar very high for the quality of a open source project. We have an enormous number of integration tests and without a doubt, Benjamin really has made this the best version of Maven we’ve ever had. I’d also like to thank Igor Fedorenko who is responsible for Tycho, along with all the changes he made to Maven core to allow its dynamic adaptation, as well as putting in place the performance framework for Maven 3.0. And Maven users can also thank Oliver Lamy for making sure the Maven Site Plugin is compatible with Maven 3.0.
You can download Maven 3.0 now!
http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0-bin.zip
http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0-bin.tar.gz
Enjoy!
Maven 3.0-alpha-3 Released!
For those you following along with our story on improving Maven, you’ll happy to know that we have made a significant step today with the release of Maven 3.0-alpha-3. Though we are marking this as an alpha release, we are largely feature complete for Maven 3.0 and consider this to be the best version of Maven that has ever existed.
Our primary goals with Maven 3.0 are:
1) Provide a drop-in replacement for Maven 2.x. You should not have to change your POMs, or rewrite plugins. Your projects should just work.
2) Provide a more reliable, stable and performant Maven. We have tried to make Maven 3.x faster and we’ve succeeded for any of the projects that we’ve tested. We have a performance framework in place to make sure we don’t regress. We are measuring network I/O, disk I/O, CPU utilization and memory usage. We also have a massive number of integration tests to make sure the behaviour remains consistent and compatible as we progress. We simply aren’t going to go backward at this point.
3) Synchronize the M2Eclipse releases with Maven 3.x so that we can immediately push fixes from Maven 3.x into M2Eclipse. For a long time M2Eclipse was out of sync with Maven trunk and created a great number of problems. We are now completely in sync and within hours of making changes in Maven 3.x they make it into the CI builds of M2Eclipse.
4) Provide an easy way to embed Maven as a library. I think we’ve really proven this with M2Eclipse but Sonatype has two other efforts taking place. The first is to embed Maven 3.0 into Hudson and the second is to embed Maven 3.0 into Nexus. The APIs that we are creating not being final is largely why we are still releasing alphas. From a CLI perspective we’re pretty much done, from an embedding perspective we still have some work to do.
4) Provide a solid base for extensions and reuse. There are three efforts going on here which are pushing the boundaries of Maven 3.x:
Tycho: Which is Sonatype’s toolchain for building OSGi bundles and Eclipse plugins & RCP applications. The changes that we made in Maven 3.x to accommodate the embedding of an OSGi runtime (in our case Equinox) was non-trivial. We’ve been working on this for over a year and we have what we believe to be the best hybridization of Maven and OSGi technologies. Maven was stretched, and pushed and pulled to get all of this to work. I believe the current adoption of Tycho by the Tigerstripe at Eclipse.org is a sign of things to come. Users want to build OSGi bundles and Eclipse plugins using real OSGi technologies with Maven and we have delivered.
Polyglot Maven: This is our attempt to create a great degree of flexibility in the core of Maven 3.x. We provide the ability to easily pull POM information from any data source and allow DSLs access to core functionality in Maven to create new tools using Maven 3.x. The development of Polyglot Maven has sparked a lot of interest and we hope to make public release in the next month.
Maven Shell: An attempt to provide an embedded form of Maven for typical CLI users. We are planning to
- Provide more intelligent caching implementation to make builds faster. Already we are seeing 100-200% speed increases over using the standard CLI (which itself is already faster then Maven 2.x).
- Integrate a powerful form of the Make-like reactor that is built into Maven 3.x to make working in the shell extremely efficient.
- Integrate an advanced form of Archetype so that we can provide a power scaffolding framework for general application development.
We are not forgetting about documentation either. All the work that has been done in Maven 3.x is currently being documented in Maven: The Definitive Guide and we will be complete when Maven 3.0 goes GA. We also have some pretty cool site generation tools that I am using to create a new Maven 3.0 site which is also be ready in time for the final release.
For now, Benjamin and I are preparing for any feedback from users who want to try the alpha-3 release and we’ll be standing by to apply patches and make fixes for anything that users find — just like we have for the last year. This is part of Sonatype’s ongoing committment to help sustain the Maven ecosystem to provide the support, tooling, and documentation to help get new users and developers involved.
You can download the Maven 3.0-alpha-3 here:
- http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0-alpha-3-bin.zip
- http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0-alpha-3-bin.tar.gz
- http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0-alpha-3-bin.tar.bz2
Enjoy!