apache / apache/maven

[MNG-7882] Command line option to build only the dependencies of the module specified with --projects (similar to --also-make)

Open
#8,734 0 comments 0 reactions 0 assignees View on GitHub
enhancement priority:minor
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 40m
Merged PRs (30d)
275

Description

**[Reto Hoehener](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rho4)** opened **[MNG-7882](https://issues.apache.org/jira/browse/MNG-7882?redirect=false)** and commented

Almost identical to {**}--also-make{**}, but call it {**}-only-make(-dependencies){**}, for example.

I would like to **install** all the dependencies of a given module (without the module itself), followed by a **deploy** of just the module.

```java
mvn -f pom.reactor.xml clean install --projects :my-module --only-make-dependencies
mvn -f pom.reactor.xml clean deploy --projects :my-module
```

Example pom.reactor.xml

```java


common-module
my-module


```

Maybe tricky: Behavior if multiple modules are specified with --projects and one of them is a dependency of another. Either strictly exclude all projects in --projects list, or fail the build, or only allow one module in the --projects list in combination with this option.

 

Also asked on SO: https://stackoverflow.com/questions/77104479/maven-reactor-is-it-possible-to-build-only-the-dependencies-of-a-specific-modul

---

**Affects:** 3.9.4

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.