I have a Dependency in child pom like this.
<dependencies>
<dependency>
<groupId>sample-groupID</groupId>
<artifactId>sfint</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>war</type>
</dependency>
</dependencies>
And I am using maven-ear-plugin.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven.ear.plugin</artifactId>
<version>2.10</version>
<configuration>
<modules>
<webModule>
<groupId>sample-gropuID</groupId>
<artifactId>sfint</artifactId>
<version>1.0.0-SNAPSHOT</version>
<moduleID>WebModule_sfint</moduleID>
<bundleFileName>sfint.war</bundleFileName>
</webModule>
</modules>
</configuration>
</plugin>
Now my problem is that I want my war file to be like this - sfint.war but I am getting it as - sfint.1.0.0-SNAPSHOT.war
Any help ??
If the war/ejb is part of an ear project, one should use bundleFileName to change the module names in the final ear artifact.
Within the
<build>
tag specify the name that you need for the artifact as "finalName".This will solve your problem:
your final EAR will be myEAR-0.0.1.SNAPSHOT.EAR that contains myWAR.war (without version number) if you want to remove version number from EAR also than add myEar
You can configure maven-ear-plugin to omit the version information in the EAR file: