Maven 1.x Ear Plugin

goal ear:generate-ear-descriptor produces invalid application.xml

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6
  • Fix Version/s: 1.6.1
  • Component/s: None
  • Labels:
    None
  • Environment:
    maven 1.0.2
  • Number of attachments :
    2

Description

if I make use of the dependency properties
ear.bundle.dir or ear.bundle.name
the generated application.xml file is invalid
since it uses dep.getArtifact() instead of
the name of the renamed dependency

  1. plugin.jelly
    08/Dec/04 9:47 AM
    13 kB
    Matthias Müller
  2. project.xml
    08/Dec/04 9:45 AM
    0.7 kB
    Matthias Müller

Activity

Hide
Matthias Müller added a comment -

Affected Version is obviously 1.6 not 1.5 !

Show
Matthias Müller added a comment - Affected Version is obviously 1.6 not 1.5 !
Hide
Felipe Leme added a comment -

Hi Matthias,

Could you please provide a test-case (for instance, a project.xml)?

Also, the problem is on 1.6, not 1.5, right?

– Felipe

Show
Felipe Leme added a comment - Hi Matthias, Could you please provide a test-case (for instance, a project.xml)? Also, the problem is on 1.6, not 1.5, right? – Felipe
Hide
Matthias Müller added a comment -

"test-case" project.xml
(which is propably not working in your environment since it
is part of a multiproject, but nevertheless the important
part are the properties "ear.bundle.dir" and "ear.bundle.name"
of the single dependency)

Show
Matthias Müller added a comment - "test-case" project.xml (which is propably not working in your environment since it is part of a multiproject, but nevertheless the important part are the properties "ear.bundle.dir" and "ear.bundle.name" of the single dependency)
Hide
Matthias Müller added a comment -

my temporary fix of the ear:generate-ear-descriptor;
but its a little bit dirty because of the code duplication

Show
Matthias Müller added a comment - my temporary fix of the ear:generate-ear-descriptor; but its a little bit dirty because of the code duplication
Hide
Felipe Leme added a comment -

Hmm, this sounds like a multiproject-only issue, as I test02 tested the situation where both bundle.name and bundle.dir were set:

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.8</version>
<properties>
<ear.bundle>true</ear.bundle>
<ear.bundle.name>LOG4J.JAR</ear.bundle.name>
<ear.bundle.dir>/APP-INF/lib</ear.bundle.dir>
</properties>
</dependency>
</dependencies>

I will give it a better look later tonight...

– Felipe

Show
Felipe Leme added a comment - Hmm, this sounds like a multiproject-only issue, as I test02 tested the situation where both bundle.name and bundle.dir were set: <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.8</version> <properties> <ear.bundle>true</ear.bundle> <ear.bundle.name>LOG4J.JAR</ear.bundle.name> <ear.bundle.dir>/APP-INF/lib</ear.bundle.dir> </properties> </dependency> </dependencies> I will give it a better look later tonight... – Felipe
Hide
Matthias Müller added a comment -

What is the content of the generated application.xml file like ???
There should be (in your case) an entry:
...
<module>
<web>
<web-uri>/APP-INF/lib/LOG4J.JAR</web-uri>
...
but there is probably an entry:
...
<module>
<web>
<web-uri>log4j-1.2.8.jar</web-uri>
...
which does not work if you try to deploy you *.ear file
to an oracle application server since there is no
such file 'log4j-1.2.8.jar' in your *.ear archive
because it had been renamed into '/APP-INF/lib/LOG4J.JAR'
during the ear creation which would be just fine if
the same name would be generated into the application.xml.

Show
Matthias Müller added a comment - What is the content of the generated application.xml file like ??? There should be (in your case) an entry: ... <module> <web> <web-uri>/APP-INF/lib/LOG4J.JAR</web-uri> ... but there is probably an entry: ... <module> <web> <web-uri>log4j-1.2.8.jar</web-uri> ... which does not work if you try to deploy you *.ear file to an oracle application server since there is no such file 'log4j-1.2.8.jar' in your *.ear archive because it had been renamed into '/APP-INF/lib/LOG4J.JAR' during the ear creation which would be just fine if the same name would be generated into the application.xml.
Hide
Felipe Leme added a comment -

This is what it generates:

<application>
<display-name>test-maven-ear-plugin-02</display-name>
<module>
<java>commons-logging-1.0.3.jar</java>
</module>
</application>

In fact, you're right, it should be:

<java>/APP-INF/lib/commons-logging-1.0.3.jar</java>

I will try to fix it later tonight (also testing in a multi-project environment).

– Felipe

Show
Felipe Leme added a comment - This is what it generates: <application> <display-name>test-maven-ear-plugin-02</display-name> <module> <java>commons-logging-1.0.3.jar</java> </module> </application> In fact, you're right, it should be: <java>/APP-INF/lib/commons-logging-1.0.3.jar</java> I will try to fix it later tonight (also testing in a multi-project environment). – Felipe
Hide
Felipe Leme added a comment -

I changed the code on CVS; it should have solved the issue.

So, could you please test it again?

– Felipe

Show
Felipe Leme added a comment - I changed the code on CVS; it should have solved the issue. So, could you please test it again? – Felipe
Hide
Matthias Müller added a comment -

I tested it and everything works fine.

Well done, thanks a lot

Matthias

Show
Matthias Müller added a comment - I tested it and everything works fine. Well done, thanks a lot Matthias

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: