[MNG-5059] --also-make-phase
- Dominant language
- Java
- Stars
- 5.3k
- Forks
- 3.1k
- Avg merge
- 20h 42m
- Merged PRs (30d)
- 297
Description
**[Jesse N. Glick](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=jglick)** opened **[MNG-5059](https://issues.apache.org/jira/browse/MNG-5059?redirect=false)** and commented
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:
```
mvn -amp test-compile -pl testedmod test -Dtest=OneTest
```
or to run an (unpacked) web application after (re-)compiling libraries it uses:
```
mvn -amp compile -pl webapp jetty:run
```
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.
---
**Affects:** 3.0.3
**Issue Links:**
- [MNG-6066](https://issues.apache.org/jira/browse/MNG-6066) Continuous Delivery friendly versions break with multi-module projects
- [MNG-6118](https://issues.apache.org/jira/browse/MNG-6118) Allow resolving inter-module dependencies when using --file
4 votes, 6 watchers
Contributor guide
Assessment
This issue has not been assessed yet.