I am working on a project that has an EJB-module. There has been a problem with this module not getting into our maven-repository (Nexus), due to the fact that it lacks version numbering. I am currently trying to fix this, but I can’t seem to get it the way I want it to.
In the pom.xml of the EJB-project:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<ejbVersion>3.0</ejbVersion>
<outputDirectory>${basedir}/target/classes </outputDirectory>
<jarName>MyProjectEJB</jarName>
<generateClient>true</generateClient>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
This is the way it originally was. Building the module resulted in two .jar files: MyProjectEJB.jar and MyProjectEJB-client.jar. I’ve tried the following to add version numbering:
<jarName>MyProjectEJB-${project.version}<jarName>
Now, I get something like: MyProjectEJB-4.1-SNAPSHOT.jar and MyProjectEJB-4.1-SNAPSHOT-client.jar. This is almost correct, but I would really like the version number to be last in the client as well (so MyProjectEJB-client-4.1-SNAPSHOT).
How can I achieve this?
clientis in this case a Maven Classifier.If you move it around in the name then it will not be possible to have correct dependencies on it.
The following dependency will use the EJB:
The following dependency will use the EJB client: