Maven 1.x Ear Plugin

need to be able to set location of resources within the EAR file

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.6
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    3

Description

The EAR plugin does not currently provide a way of changing the path of included resources.
This is a problem for weblogic server 8.1, if you want to place bundled JARs into the /APP-INF/lib directory, so that they are available to all the other modules contained in the EAR file.

I think the best solution would be to mirror the war.target.path property of the WAR plugin, and create an ear.target.path property.

The Dependency element would look something like the following.

<dependency>
<id>third-party</id>
<version>1.0</version>
<properties>
<ear.target.path>/APP-INF/lib</ear.target.path>
</properties>
</dependency>

  1. ejb-target-path-patch.txt
    17/Oct/04 8:46 PM
    1 kB
    Wiley Fuller
  2. maven.xml
    09/Nov/04 8:20 PM
    2 kB
    Wiley Fuller
  3. project.xml
    09/Nov/04 8:20 PM
    3 kB
    Wiley Fuller

Activity

Hide
Wiley Fuller added a comment -

A patch to allow dependencies to be added to the EAR file with arbitrary paths.
This implementation is different to the implementation of war.target.path. It uses the ant zipfileset element instead of copying the dependencies to the desired path before adding.

Show
Wiley Fuller added a comment - A patch to allow dependencies to be added to the EAR file with arbitrary paths. This implementation is different to the implementation of war.target.path. It uses the ant zipfileset element instead of copying the dependencies to the desired path before adding.
Hide
Wiley Fuller added a comment -

Added the maven.xml file for testing this change.

Show
Wiley Fuller added a comment - Added the maven.xml file for testing this change.
Hide
Wiley Fuller added a comment -

Added project.xml file for testing this issue.

Show
Wiley Fuller added a comment - Added project.xml file for testing this issue.
Hide
Felipe Leme added a comment -

fixed with minor changes

Show
Felipe Leme added a comment - fixed with minor changes
Hide
Felipe Leme added a comment -

Due to fix for MPEAR-26 I changed the new property to ear.bundle.dir (instead of ear.target.path).

Show
Felipe Leme added a comment - Due to fix for MPEAR-26 I changed the new property to ear.bundle.dir (instead of ear.target.path).
Hide
Dale Wyttenbach added a comment -

Has anyone verified that this solution addresses the problem for WL 8.1? I was unable to get an EAR to deploy without modifying the generated application.xml and manually add the "APP-INF/lib" path info:

<module>
<java>APP-INF/lib/foo.jar</java>
</module>

Shouldn't the plugin do this automatically given that I have defined this property in the jar dependency?

<ear.bundle.dir>APP-INF/lib</ear.bundle.dir>

Show
Dale Wyttenbach added a comment - Has anyone verified that this solution addresses the problem for WL 8.1? I was unable to get an EAR to deploy without modifying the generated application.xml and manually add the "APP-INF/lib" path info: <module> <java>APP-INF/lib/foo.jar</java> </module> Shouldn't the plugin do this automatically given that I have defined this property in the jar dependency? <ear.bundle.dir>APP-INF/lib</ear.bundle.dir>

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
3h
Original Estimate - 3 hours
Remaining:
3h
Remaining Estimate - 3 hours
Logged:
Not Specified
Time Spent - Not Specified