I'm new to Maven and I'm converting current EAR application into Maven. It is a multi module project (ear, ejb, web, utility).
Some utility modules depend on other utility modules. I don't want Maven to add version number into modules final JARs. So in EAR's POM.XML
I use <bundleFileName>
option where I set the name of the final JAR. Problem is that generated MANIFEST.MF
file of module which is dependent
on this module still uses version number in JAR file name.
Any idea what I'm doing wrong?
Here is excerpt of EAR's pom.xml
<jarModule >
<groupId>${project.parent.groupId}</groupId>
<artifactId>batch</artifactId>
<bundleFileName>batch.jar</bundleFileName>
</jarModule >
Here is excerpt of module's pom.xml
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>batch</artifactId>
<version>${project.parent.version}</version>
<type>jar</type>
</dependency>
<build>
<finalName>util</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
The result util's MANIFEST.MF contains batch-1.0.jar But I'd like it to contain batch.jar as mentioned in EAR's pom.xml
When you release this ear, you will deploy these modules with the same version?
If yes, then you can use it:
For example: project structure:
Imagine that web-module has ejb-module dependency, then you can add in web-module project this dependency:
Hope it helps.