[ https://jira.codehaus.org/browse/MNG-5059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=322144#comment-322144 ]
Milos Kleint commented on MNG-5059: ----------------------------------- in some situations, even getting the other projects linked in reactor is enough, no phase has to be executed: eg. mvn -pl mainProject -Dexec.args="-cp %classpath Main" exec:exec currently puts the library project's local repository jars on cp but in some situations it would be preferable to have the target/classes folders included. That seems to be happening when you run mvn -am -pl compile phase, all compiles nicely without local repository jars. "-amp validate" would be a nice workaround when this issue is implemented, but maybe we could get away without executing any phases? > --also-make-phase > ----------------- > > Key: MNG-5059 > URL: https://jira.codehaus.org/browse/MNG-5059 > Project: Maven 2 & 3 > Issue Type: Improvement > Components: Command Line > Affects Versions: 3.0.3 > Reporter: Jesse Glick > Assignee: Jason van Zyl > > Background: > http://mail-archives.apache.org/mod_mbox/maven-dev/201104.mbox/%3Cincnbn$4kl$1...@dough.gmane.org%3E > {{--also-make}} (with {{--projects}}) is useful, but suffers from the problem > that dependent projects are always built to the same goal/phase as the > selected project(s). That is fine for e.g. {{compile}} or {{install}}, but > not for e.g. {{test}} where you would only want to build {{compile}} (or > {{test-compile}}) for dependencies, not actually test them. > Suggest a variant form of this parameter (say {{--also-make-phase}} / > {{-amp}}) which would accept a goal or phase to run on dependencies in place > of the regular arguments. For example, to run a unit test after making sure > all its dependencies have been (re-)compiled: > {noformat} > mvn -amp test-compile -pl testedmod test -Dtest=OneTest > {noformat} > or to run an (unpacked) web application after (re-)compiling libraries it > uses: > {noformat} > mvn -amp compile -pl webapp jetty:run > {noformat} > You might want to pass a goal rather than a phase, so the name could be > misleading, but I think that would be a rarer use case. Ditto passing > multiple goals/phases for the upstream projects. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira