jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 1.x Multi-Project Plugin
  • MPMULTIPROJECT-66

pre/postGoal defined in plugins are only called once during multiproject goals

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Duplicate
  • Affects Version/s: 1.5
  • Fix Version/s: None
  • Labels:
    None

Description

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.

Issue Links

duplicates

Bug - A problem which impairs or prevents the functions of the product. MAVEN-1638 Post goals in plugins only seem to run once

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Lukas Theussl added a comment - 25/Jul/06 8:46 PM

Please check that this is fixed with one of the recent 1.1-beta-3 snapshots: http://people.apache.org/~aheritier/maven/1.X/snapshots/

Show
Lukas Theussl added a comment - 25/Jul/06 8:46 PM Please check that this is fixed with one of the recent 1.1-beta-3 snapshots: http://people.apache.org/~aheritier/maven/1.X/snapshots/

People

  • Assignee:
    Lukas Theussl
    Reporter:
    Shinobu Kawai
Vote (0)
Watch (0)

Dates

  • Created:
    25/Jul/06 3:29 PM
    Updated:
    25/Jul/06 8:46 PM
    Resolved:
    25/Jul/06 8:46 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.