Samstag, 16. Oktober 2010

Sonatype Maven Shell and Parallel builds in Maven 3


Today I played around with the parallel build feature from Maven 3 and with the sonatype maven shell. The sonatype maven shell is based (required) on Maven 3. Here my first build performance results.

Maven 3 Maven 3 (mvn -T 10) Maven 3 (mvn -T 1.5C) Maven Shell
mvn clean compile ca. 5 sec ca. 3 sec ca. 4 sec ca. 2 sec
mvn clean package ca. 12 sec ca. 10 sec ca. 10 sec ca. 7 sec
mvn package ca. 7 sec ca. 6 sec ca. 6 sec ca. 3 sec
mvn clean site ca. 4 min ca. 4 min ca. 4 min crashed
mvn javadoc:javadoc ca. 56 sec ca. 29 sec ca. 29 sec ca. 27 sec

More about parallel builds in Maven 3 here:
https://cwiki.apache.org/confluence/display/MAVEN/Parallel+builds+in+Maven+3

More about the maven shell from sonatype here:
http://shell.sonatype.org/index.html

Apache Maven 3 and the Maven Site Plugin

Today I have a look on maven 3 features, when I start to build the maven site of my project it always failed. Because the configuration for the maven site was changed in the maven version 3.X. Here my first maven site configuration that worked for my project:



More about the maven site plugin configuration version for maven version 3.X here:
https://cwiki.apache.org/MAVEN/maven-3x-and-site-plugin.html

Dienstag, 24. August 2010

OSGi Bundle Quality or Bundle Information Repository

A lot of projects build their JARs as OSGi bundles e.g. Jersey. The quality varies from very good bundles up to the bundles they do not work they only generate a MANIFEST file. Often you spend a lot of time until you have your frameworks running in an OSGi environment. Even if these frameworks JARs are offered as OSGi bundles already. So Neil Bartlett came up at Twitter with the idea to build a portal where you can find information about the quality of OSGi bundles.

After the twitter post from Neil, I think about such a portal and here are my first ideas about such a information portal. I think first we need a small command line tool which implements a set of static and dynamic tests for OSGi bundles. Nice would be a set of plugins which integrate the tool into your build tool (e.g. maven, ant) or favorite IDE.

What kind of static tests should this bundle test tool support?
  • Check if the to test JAR (bundle) have a valid MANIFEST e.g. to check via Peter Kriens BND lib.
  • Check some MANIFEST pattern e.g. do the bundle import the exported packages, which is a OSGi best practice.
  • Do the bundle describe e.g. via extra configuration where to get the runtime dependencies e.g. via maven pom.xml? Provide this dependencies (JARs) all of the imported packages.
  • Use the bundle a framework for declarative services? E.g. do the bundle use DS, Blue Print, iPOJO, Pearbeary...
  • Which OSGi services does the bundle use e.g. configuration service, logging service etc.

What kind of dynamic test should the test tool provided?
  • Check if the bundle can be deployed in an OSGi container (equinox, felix,… therefore the pax runner can be used for implementation). The bundle should ship a reference set of runtime dependencies or provided a configuration file which describes where to get these dependencies e.g. via maven or ivy. The order in which the runtime dependencies will be started can be determined via a static test on each bundle (for implementation the BND lib can be used, or pax runner do this already?). In addition to the runtime dependencies it should be a possibility that a bundle can describe a set of system properties.
  • Test that the exported packages can be used from a bundle. There for a test bundle can be generated which use the exported package resources of the bundle under test.
  • Check that if a started OSGi bundle provides OSGi services.
  • When a bundle use a framework for declarative services e.g. DS, verify that the decelerated services are up and running in the service registry.
  • Check that a bundle restart works. Service is down and will be started again etc.

When we have such a tool to automatically verify the quality of an OSGi bundle and get a set of information about the bundle. A central information portal/repository would be very nice where you can submit your bundles and the checks will be run on your bundle and published. Where you can search for bundles and you get information where to download the bundle and a set of information of the quality of the bundle. I think such an information repository about OSGi bundles and there quality should be hosted under www.osgi.org.

Here some ideas how to submit a bundle into such an information repository/portal? I think the portal should provide a REST service and web form to submit bundles to check and to add to the repository. The runtime dependencies can submit as ZIP or as maven pom.xml or ivy configuration. For the REST service plugins for build tools and IDEs would be nice. E.g. a plugin for maven which will be bind to the deploy phase of maven, could automatically deploy the bundle to check also to the bundle information repository.

Is anyone interested to build the testing tool with me as an open source project? Or is there a cool tool out there which can do such tests? Please contact me or write a comment to the post?


Links:

Sonntag, 15. August 2010

Eclipse Tipp Reloaded - Disable STS Dashboard On Startup

Last year I wrote a blog entry how to disable the STS (Spring Tool Suite) dashboard on eclipse startup see here. In newer version of STS the option is now in the preference dialog of STS see the screenshot bellow.


Links
  • http://tux2323.blogspot.com/2009/11/eclipse-tipp-disable-sts-dashboard-on.html
  • http://www.springsource.com/developer/sts