Category Archives: OSGi

Apache maven-bundle-plugin 2.2.0 released!


January 17, 2011 By Stuart McCulloch

Today I released version 2.2.0 of the maven-bundle-plugin from Apache Felix. This release may look like a minor update because it only contains two fixes, but one of them is very important. The workhorse behind the maven-bundle-plugin, Peter Kriens’ bnd tool, has been upgraded from 0.0.384 to 1.15.0. The new version is much smarter in deciding which packages to export and import, and supports easy creation of Web Archive Bundles (WABs) which can act both as bundles and standard WAR files. Add numerous other small improvements and fixes to the mix and this should result in a much better experience overall.

Special mention should be made of the efforts of Juven Xu and Peter Kriens who worked together to add Nexus OSS staging to Peter’s Ant build. Previously bnd artifacts were manually uploaded by occasional third-party requests to MAVENUPLOAD, often a very laborious process. Third-party uploads to Maven Central have since been streamlined and automated with Nexus, but OSS hosting is still preferred by project owners who want to stage and check artifacts as part of their regular build process.

On behalf of all the OSGi developers who use the maven-bundle-plugin I’d like to thank Juven and Peter for their work getting the latest versions of bnd onto Maven Central!

How to build a RAP application with Tycho


By Jason van Zyl

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 3.0-alpha-3 Released!


November 13, 2009 By Jason van Zyl

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:

Enjoy!

Introduction to OSGi with Pax, Maven, and Nexus Professional


July 20, 2009 By Tim O'Brien

We’ve released a pre-alpha version of the Maven Cookbook which contains a chapter on OSGi development with Maven via the Pax plugin from OPS4J. This chapter contains a series of recipes which will walk you through the process of creating an OSGi project, importing bundles from both a Maven repository and existing OSGi Bundle Repositories (OBR), and executing an OSGi runtime environment all with the help of the Maven Pax Plugin. The last few chapters provide a road map for developers interested in hosting and combining multiple Maven and OBR repositories into a single repository group with Nexus.

To read the pre-alpha, version 0.1.1 release of the Maven Cookbook, you can:

Nexus Pro: Support for OSGi Bundle Repositories (OBRs)


July 14, 2009 By Stuart McCulloch

Over the last month or so I have been working on adding OSGi Bundle Repository (OBR) support to Nexus Professional, and I am happy to announce this feature will be available in the 1.3.5 release. But what exactly is OBR and why should you care?

OBR has been around since 2006, it defines a small XML schema and Java API that allows clients to discover and deploy OSGi bundles by matching capabilities with requirements. Distributors provide XML describing their bundles, and this is used by OBR service implementations running on OSGi frameworks. Management clients talk to their local OBR service using the Java API.

Continue reading