Details
Description
The current ArtifactType enumeration does not include support for EJB-client jars. In fact, the ejb plugin currently fabricates the jar name and has no support for handling the EJB-client jar, only creating it in the ${maven.build.dir} directory. In addition, the Dependency class cannot recognize EJB-client jars by type and add them to the classpath.
I propose adding an EJB_CLIENT ArtifactType with type="ejb-client" and extension="client.jar". This will result in repository pathing of <group-id>/ejb-clients/<artifact-id>.client.jar for vanilla EJB projects.
Toward this goal, I have modified the ArtifactType.findType() method to search an array containing all type constants, in order to simplify future additions to this class.
I also added an ArtifactType.JAR constant, for consistency.
Finally, I modified the Dependency.isAddedToClasspath() method to use the ArtifactType constants for JAR, EJB, and EJB_CLIENT for comparisons with the stated type name, and finally returning false if none of these match on the getType() method.
I will be submitting another patch against the maven-plugins project, for the ejb plugin and the artifact plugin...this patch (which I guess I'll submit to both MPxxx pseudo-projects on JIRA...) will enable EJB-client support and improve the artifact plugin to take full advantage of the ArtifactType enumeration. I'll update this issue with the appropriate JIRA issue ID's when I have them.
Attached is a patch for the maven-core.
Attachments
Issue Links
| This issue is depended upon by: | ||||
| MPEJB-18 | ejb:install-client is not working |
|
|
|
This is the maven-core patch for improving EJB-client handling.