[ https://issues.apache.org/jira/browse/MNG-8597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tamas Cservenak updated MNG-8597: --------------------------------- Description: Assume a multi module project, and cwd is at "top" project. If you invoke a goal, it will be executed on each project of reactor. If your goal is a mojo, mojo will be invoked with every reactor project, _even if Mojo does not requires project_ (mojo descriptor requiresProject=false). In some cases it may, like some sort of analysis, it may be handy to: * have access to all projects as "built by Maven" (so session populated) * but have Mojo invoked ONCE, for example with "top" project only This is just a forming idea, unsure yet about details. But to showcase what I mean: following mojo {{mvn toolbox:parent-child-tree}} lists parent-child tree in a project. If you run it from top, it will fill screen, but ONLY the first output is interesting, while all the rest are factually subtree of the first (as expected). This mojo cannot work (fully) with any "reactor limiting" param, like -N or -rf as the tree will be incomplete, as Maven session will in fact be incomplete. was: Assume a multi module project, and cwd is at "top" project. If you invoke a goal, it will be executed on each project of reactor. If your goal is a mojo, mojo will be invoked with every reactor project, _even if Mojo does not requires project_ (mojo descriptor requiresProject=false). In some cases it may, like some sort of analysis, it may be handy to: * have access to all projects as "built by Maven" (so session populated) * but have Mojo invoked ONCE, for example with "top" project only This is just a forming idea, unsure yet about details. > Ability to invoke single Mojo with subprojects loaded but not executed > ---------------------------------------------------------------------- > > Key: MNG-8597 > URL: https://issues.apache.org/jira/browse/MNG-8597 > Project: Maven > Issue Type: Task > Reporter: Tamas Cservenak > Priority: Major > > Assume a multi module project, and cwd is at "top" project. If you invoke a > goal, it will be executed on each project of reactor. If your goal is a mojo, > mojo will be invoked with every reactor project, _even if Mojo does not > requires project_ (mojo descriptor requiresProject=false). > In some cases it may, like some sort of analysis, it may be handy to: > * have access to all projects as "built by Maven" (so session populated) > * but have Mojo invoked ONCE, for example with "top" project only > This is just a forming idea, unsure yet about details. > But to showcase what I mean: following mojo {{mvn toolbox:parent-child-tree}} > lists parent-child tree in a project. If you run it from top, it will fill > screen, but ONLY the first output is interesting, while all the rest are > factually subtree of the first (as expected). This mojo cannot work (fully) > with any "reactor limiting" param, like -N or -rf as the tree will be > incomplete, as Maven session will in fact be incomplete. -- This message was sent by Atlassian Jira (v8.20.10#820010)