empire29
empire29

Reputation: 3890

Maven - How to build a dependency project

I have a mutli-module project.

How do I get ProjectB to build when I build ProjectA (I need to make sure ProjectB builds properly and creates its Jar)?

When I build the Parent project all the Project builds are executed properly, but I want to all ProjectA to be built separately (which builds its dependency ProjectB) as well.

Upvotes: 0

Views: 149

Answers (1)

Miquel
Miquel

Reputation: 15675

I'm afraid you cannot do that. You already have an aggregator project, parent, that builds ProjectA and ProjectB. You cannot trigger projectB to be build only when invoking mvn on projectA. If you could, building your aggregator would build B, then B again, then A.

Upvotes: 2

Related Questions