Reputation: 1823
I've got two maven projects A and B, A depends on B. When B gets updated, I need to perform following steps (to build A):
Is it possible to combine steps 1 & 2 together, and build and provide a jar of project B to A automatically?
Upvotes: 0
Views: 82
Reputation: 18939
You can try to use a mutli-module parent pom to build both at once. It's not the same thing exactly, but it makes it much easier when working with multiple poms. A build clean install on the parent pom will do the same to each of its children and they will see the latest version available.
Actually, for your case you are probably better of doing mvn clean install
which combines steps 1 & 2 into one command line. Install will build
if there is no source available. Multi-pom is better if you have that situation with multiple poms (our case 5).
Also, you could write a quick batch script or a single line of PowerShell or Bash to do what a batch script could do.
Upvotes: 3