Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
MNG-6118 enables users to build other projects of a multi-module project even when those projects are not located in the current directory or below. Imagine a multi module project as follows:
- root
- library
- app (dependent on library)
When navigating to app, a user can execute mvn <goal> -am and it will build library and root next to app. This is nice because no matter where you are in the directory structure of the multi module project, the full multi module project context is known and can be used.
The next logical step would be to be able to select submodules from anywhere in the directories using the --projects flag.
Using the project structure of above, I should be able to navigate into app and compile another (sub)module (or multiple modules) by specifying the project:
cd app mvn compile -pl :library # or by directory mvn compile -pl ../library # or to build multiple mvn compile -pl :app,:library
I have started working on this and should be able to provide PRs later today.