Maven 1.x EJB Plugin

generated client jars violate maven artifact naming convention

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: 1.7.1
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

the names of the generated client jars are built using the following formula:

path.append(project.getArtifactId());
path.append("-");
path.append(version);

if ( type.equals( "ejb-client" ) ) { path.append( "-client.jar" ); }
else if ( type.equals( "ejb" ) ) { path.append(".jar"); }

( copied from org.apache.maven.ejb.EJBArtifactTypeHandler.constructRepositoryFullPath(String type, Project project, String version) )

resulting in names like: mymodule-1.0-client.jar and dependency specs like

<artifactId>myModule</artifactId>
<version>1.0-client</version>

which is silly IMO. The following makes more sense:

<artifactId>myModule-client</artifactId>
<version>1.0</version>

The change is trivial but will break compatibility, so it probaly requires a vote

Activity

Hide
Vincent Massol added a comment -

Hi Rafal,

All this is done on purpose. First, and this is something missing in the doco, the latest version of the EJB plugin requires Maven 1.1. The way to specify a dependency on an ejb-client is:

<artifactId>myModule</artifactId>
<version>1.0</version>
<type>ejb-client</type>

Then resulting name is indeed mymodule-1.0-client.jar. the "client' part is called a classifier. The reason it is after the version is to prevent mixing it with the artifactId. This is a notion introduced in m2. The general format is: <artfactId><version>-<classifier>.<extension>

Show
Vincent Massol added a comment - Hi Rafal, All this is done on purpose. First, and this is something missing in the doco, the latest version of the EJB plugin requires Maven 1.1. The way to specify a dependency on an ejb-client is: <artifactId>myModule</artifactId> <version>1.0</version> <type>ejb-client</type> Then resulting name is indeed mymodule-1.0-client.jar. the "client' part is called a classifier. The reason it is after the version is to prevent mixing it with the artifactId. This is a notion introduced in m2. The general format is: <artfactId><version>-<classifier>.<extension>

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: