Maven 1

adding EJB-client support to ArtifactType, Dependency

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.0-rc2
  • Fix Version/s: 1.0-rc4
  • Component/s: core
  • Labels:
    None
  • Environment:
    any
  • Number of attachments :
    1

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.

Issue Links

Activity

Hide
John Casey added a comment -

This is the maven-core patch for improving EJB-client handling.

Show
John Casey added a comment - This is the maven-core patch for improving EJB-client handling.
Hide
John Casey added a comment -

Cross-posted with issues:

MPARTIFACT-4
MPEJB-2

The post to MPEJB-2 is actually an addendum to previous comments by other users, with a new patch.

Show
John Casey added a comment - Cross-posted with issues: MPARTIFACT-4 MPEJB-2 The post to MPEJB-2 is actually an addendum to previous comments by other users, with a new patch.
Hide
Brett Porter added a comment -

fixed elsewhere

Show
Brett Porter added a comment - fixed elsewhere

People

Vote (4)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
30m
Original Estimate - 30 minutes
Remaining:
30m
Remaining Estimate - 30 minutes
Logged:
Not Specified
Time Spent - Not Specified