Reputation:
I have two war projects - A and B. B project includes A project at building time and is deployed to server. A project is not deployed to server.
B includes A this way:
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>projectA</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
<type>war</type>
</dependency>
What I want - every time I build project A, project B must be build when building of project A is over. How can I do that?
Upvotes: 0
Views: 34
Reputation: 328614
You have two options:
Convert the two projects into Maven modules (i.e. copy them as folders into a Maven project) and then add this to your POM:
<modules>
<module>A</module>
<module>B</module>
</modules>
Longer explanation: http://books.sonatype.com/mvnex-book/reference/multimodule.html
Upvotes: 1