We have a Spring-boot multi-module project with these many modules
<modules>
<module>application-service</module>
<module>common-service</module>
<module>core-service</module>
<module>account-service</module>
<module>auth-service</module>
<module>event-service</module>
<module>reports-service</module>
<module>integration-service</module>
<module>schedule-service</module>
</modules>
The entire project will be built as a WAR file and all the modules will be built as jars residing inside the WAR, but the jar names will always be like account-service-1.0.0.jar. Is there a way to do some modification in the pom.xml so that
- We can append the branch name with the
jarbuilds likeuat-account-service-1.0.0.jarother thanaccount-service-1.0.0.jar. It doesn't have to be a GIT branch name any hardcoded value can be given. - We can increment the version of the build every time we take a build.
Parent pom configuration
<groupId>com.fintech.wallet</groupId>
<artifactId>fintech-money</artifactId>
<version>1.0.0</version>
<name>fintech-money</name>
<description>Fin7ech Money Project</description>
<packaging>pom</packaging>
Child/Module pom configuration
<parent>
<groupId>com.fintech.wallet</groupId>
<artifactId>fintech-money</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>account-service</artifactId>
<name>account-service</name>
<packaging>jar</packaging>
<url>http://maven.apache.org</url>