Maven Build Plug-In

maven-build-plugin-1.0.jar

Please use improved version of this plugin from this post.

This pugin will allow to run single command on one or set of maven projects to build or deploy them instead of doing separate maven goals on each project. This will even work inside a single project as well as on root project containing sub-projects.
The only requirement is to have “maven.multiproject.type” property defined in each project.

Generic plugin which provides build and deploy goals that can be customized to run list of maven goals across maven projects using maven:rector.
The plugin is using “maven.multiproject.type” property to determine project type in order to execute appropriate list of commands.
The plugin will append the value specified in “maven.multiproject.type” to “.build.commands” and “.deploy.commands” to get list of maven goals to run.
For example here is the list of default goals to be run when doing build on jar, ejb, war and ear:

jar.build.commands = clean,jar:jar,jar:install
ejb.build.commands = clean,ejb:ejb,ejb:install
war.build.commands = clean,war:war,war:install
ear.build.commands = clean,ear:ear,ear:install

The properties can be customized in project.properties to add/remove goals.

There are no deploy commands defined by default. The deploy goals are specific to the project and need to be defined in build.properties or project.properties.
For example it would make sense to have ear.deploy.commands = weblogic:undeploy,weblogic:deploy property ser in root project.properties.

  • build – will execute ${maven.multiproject.type}.build.commands on
    each project under base directory. Will stop on first build failure.
  • deploy – will execute ${maven.multiproject.type}.deploy.commands on
    each project under base directory. Wont stop on failure.
  • build-deploy – will execute ${maven.multiproject.type}.deploy.commands and
    ${maven.multiproject.type}.deploy.commands on
    each project under base directory. Will only stop on first build failure,
    deploy failures will be ignored.

1 comment to Maven Build Plug-In

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>