Vivek Srivastava
Vivek Srivastava

Reputation: 37

Multi Maven Modules + Build child module with dependent project module in child module

I have a parent multi module maven project

1 parent - 3 children

1.core 2.rest
3.batch

Scenario: Rest is dependent on core. Batch is dependent on core.

If I build a Rest project than the dependent core project should also get build internally through pom. and similarly, If I build a Batch project than the dependent core project should also get build internally through pom in m2 folder of maven repo.

Upvotes: 0

Views: 447

Answers (1)

J Fabian Meier
J Fabian Meier

Reputation: 35795

You can build by using something like

mvn clean install -pl rest -am

which will then build rest and its dependencies, which is core.

Upvotes: 1

Related Questions