pre/postGoal defined in plugins are only called once during multiproject goals ------------------------------------------------------------------------------
Key: MPMULTIPROJECT-66 URL: http://jira.codehaus.org/browse/MPMULTIPROJECT-66 Project: maven-multiproject-plugin Issue Type: Bug Affects Versions: 1.5 Reporter: Shinobu Kawai Priority: Critical pre/postGoal defined in plugins are only called once during multiproject goals. You can reproduce this problem by the following: maven genapp -Dmaven.genapp.template=default -Dmaven.genapp.template.id=parent -Dmaven.genapp.template.name=Parent -Dmaven.genapp.template.package=parent create child1 and child2 directories in child1 directory: maven genapp -Dmaven.genapp.template=default -Dmaven.genapp.template.id=child1 -Dmaven.genapp.template.name=Child1 -Dmaven.genapp.template.package=child1 in child2 directory: maven genapp -Dmaven.genapp.template=default -Dmaven.genapp.template.id=child2 -Dmaven.genapp.template.name=Child2 -Dmaven.genapp.template.package=child2 running maven multiproject:goal -Dgoal=clean in the parent project gives the following: <snip /> +---------------------------------------- | Executing clean Child1 | Memory: 3M/4M +---------------------------------------- build:start: clean:clean: Running post goal: clean:clean +---------------------------------------- | Executing clean Child2 | Memory: 3M/4M +---------------------------------------- clean: build:end: build:start: clean:clean: clean: build:end: <snip /> The "Running post goal: clean:clean" appears only once. (If you run maven multiproject:clean, you will see that it only gets run on the parent project.) As a workaround, you need to copy the pre/postGoal from the plugin.jelly to each (except for the first) project's maven.xml. However, this will cause multiple runs when you do individual child runs. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira