maven-bundle-plugin bundle packaging lifecycle

In Maven the element in the pom.xml corresponds to a lifecycle to use to build the code. The lifecycle in turn comprises a number of phases, each of which is bound to goals provided by plugins. (NB: since this is a 1:1 relationship we can use packaging and lifecycle interchangeably).

The Maven defaults for lifecycles, phases and phase-to-goal bindings are in a file called component.xml. For Maven 2.0.x this lives here.

There are three lifecycles: ‘default’, ‘clean’ and ‘site’, the first being by far the most involved and including compilation, running tests etc. More detail on Maven lifecycles here.

It is also possible for Maven plugins to define their own lifecycle (as per the Maven book), provided that they specify true. So for example the maven-bundle-plugin does exactly this, defining a ‘bundle’ lifecycle. The phases and goal bindings for this lifecycle are similar to the ‘default’ lifecycle. See the maven-bundle-plugin’s components.xml here.

Posted on July 22, 2008, in random. Bookmark the permalink. Leave a Comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 126 other followers