Dependency Management and Versioning With a Maven Multi-Module Project
Fleeting- External reference: https://dzone.com/articles/maven-multi-module-project-with-versioning
Dependency Management and Versioning With a Maven Multi-Module Project - DZone Java
A very important use of the dependency management section is to control, consolidate, and centralize the versions of artifacts used in dependencies and inherited by all children
We are going to modify the parent root pom.xml and add two profiles. One is versioning for Java EE 7 and the other for Java EE 8.
And with Maven, we can run:
<profiles>
<profile>
<id>java-ee-7-profile</id>
<properties>
<javax.version>7.0</javax.version>
</properties>
</profile>
<profile>
<id>java-ee-8-profile</id>
<properties>
<javax.version>8.0</javax.version>
</properties>
</profile>
</profiles>
mvn clean install -P java-ee-7-profile OR mvn clean install -P java-ee-7-profile,java-ee-8-profile for both profiles.