You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Martin Kanters (Jira)" <ji...@apache.org> on 2022/01/14 10:54:00 UTC

[jira] [Created] (MNG-7390) Select multi module project's modules outside of pwd using --projects

Martin Kanters created MNG-7390:
-----------------------------------

             Summary: Select multi module project's modules outside of pwd using --projects
                 Key: MNG-7390
                 URL: https://issues.apache.org/jira/browse/MNG-7390
             Project: Maven
          Issue Type: Improvement
          Components: Reactor and Workspace
            Reporter: Martin Kanters


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:

{code:bash}
cd app
mvn compile -pl :library
# or by directory
mvn compile -pl ../library
# or to build multiple
mvn compile -pl :app,:library
{code}

I have started working on this and should be able to provide PRs later today.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)