Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/MPEAR-26

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MPEAR-26
    Summary: Allow included dependencies to have a  different name inside the ear
       Type: New Feature

     Status: Open
   Priority: Major

 Original Estimate: 1 hour
 Time Spent: Unknown
  Remaining: 1 hour

    Project: maven-ear-plugin
   Fix Fors:
             1.6
   Versions:
             1.5

   Assignee: Felipe Leme
   Reporter: Felipe Leme

    Created: Fri, 15 Oct 2004 8:39 AM
    Updated: Fri, 15 Oct 2004 8:39 AM

Description:
I faced a situation where my ear had a war and a jar inside, and the war had a 
classpath reference to the jar, but using a pre-defined name (instead of the full 
versioned name used by maven). 
In order to achieve this setup, I would have to either hack the ear using a postGoal 
script or add a new property to the dependency and then change the plugin. I think the 
former is more elegant, and it works as this:

1.The new optional property is called ear.bundle.name
2.If the property is not set (in a dependency), the plugin assumes the default 
behaviour (i.e., includes the dependency as is from the local repo)
3.If the property is set, the depenency is copied to maven.ear.src, using the supplied 
name.

So, for instance, let say I have dependencies company-root-1.2.3.war and 
myproject-setup-2.0.1.jar, but the war has the following classpath entry:

Class-path: project-setup.jar

(which makes sense, as the same war is used in many ears and the version for the setup 
jar would be different in each one)

Then the project.xml for my ear would be:

    <dependency>
      <groupId>myProject</groupId>
      <artifactId>myproject-setup</artifactId>
      <version>2.0.1</version>
      <type>jar</type>
      <properties>
        <ear.bundle>true</ear.bundle>
        <ear.bundle.name>project-setup.jar</ear.bundle.name>
      </properties>
    </dependency>
    <dependency>
      <groupId>myCompany</groupId>
      <artifactId>companyroot</artifactId>
      <version>1.2.3</version>
      <properties>
        <ear.bundle>true</ear.bundle>
        <ear.appxml.war.context-root>/</ear.appxml.war.context-root>
      </properties>
      <type>war</type>
    </dependency>


If there are no objections (I think this situation is generic enough, it's not a 
particular need for my projects), I will implement such change.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to