Maven 1.x Multi-Project Plugin

Can not mix multiproject goals with other/custom goals

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.5
  • Component/s: None
  • Labels:
    None
  • Environment:
    windows 2000
    cruisecontrol
    maven 1.0.2
    java 1.4.2
  • Number of attachments :
    0

Description

I would like to configure the multiproject plug-in to run checkstyle separately on our buildserver.
We are trying to run maven using the command
maven -Dgoal checkstyle multiproject:install multiproject:goal multiproject:clean multiproject:deploy

This however only results in an execution which could have been described as
maven multiproject:install multiproject:install multiproject:clean multiproject:deploy.

That is: install is runned twice instead of running install followed by checkstyle.

Issue Links

Activity

Hide
Brett Porter added a comment -

until the bug is fixed you can try this:

maven multiproject:install mygoal multiproject:clean multiproject:deploy

in your maven.xml, add:
<goal name="mygoal">
<j:set var="goal" value="checkstyle" />
<attainGoal name="multiproject:goal" />
</goal>

Show
Brett Porter added a comment - until the bug is fixed you can try this: maven multiproject:install mygoal multiproject:clean multiproject:deploy in your maven.xml, add: <goal name="mygoal"> <j:set var="goal" value="checkstyle" /> <attainGoal name="multiproject:goal" /> </goal>
Hide
Michal Slocinski added a comment -

Workaround given here doesn't work for me :-/ I've similar situation like described below,
except that I'm tryining to run goal defined in my custom plugin.

Show
Michal Slocinski added a comment - Workaround given here doesn't work for me :-/ I've similar situation like described below, except that I'm tryining to run goal defined in my custom plugin.
Hide
Jesper Tejlgaard Pedersen added a comment -

The workaround I used myself was actually slightly different. I added the following to all maven.xml files, which were in the projects included in the multiproject build.

<preGoal name="java:compile">
<echo>Custom forced checkstyle</echo>
<attainGoal name="checkstyle"/>
</preGoal>

and still achieved the functionality that I wanted....

I do not know wether this will work for you Michal, as you have written your own custom plugin.

Show
Jesper Tejlgaard Pedersen added a comment - The workaround I used myself was actually slightly different. I added the following to all maven.xml files, which were in the projects included in the multiproject build. <preGoal name="java:compile"> <echo>Custom forced checkstyle</echo> <attainGoal name="checkstyle"/> </preGoal> and still achieved the functionality that I wanted.... I do not know wether this will work for you Michal, as you have written your own custom plugin.

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: