Issue Details (XML | Word | Printable)

Key: MPEAR-31
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Felipe Leme
Reporter: Matthias Müller
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 1.x Ear Plugin

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

Created: 08/Dec/04 09:12 AM   Updated: 09/Dec/04 05:03 AM   Resolved: 09/Dec/04 05:03 AM
Return to search
Component/s: None
Affects Version/s: 1.6
Fix Version/s: 1.6.1

Time Tracking:
Not Specified

File Attachments: 1. File plugin.jelly (13 kB)
2. XML File project.xml (0.7 kB)

Environment: maven 1.0.2


 Description  « Hide

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



Matthias Müller added a comment - 08/Dec/04 09:25 AM

Affected Version is obviously 1.6 not 1.5 !


Felipe Leme added a comment - 08/Dec/04 09:36 AM

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


Felipe Leme made changes - 08/Dec/04 09:36 AM
Field Original Value New Value
Assignee Felipe Leme [ felipeal ]
Matthias Müller added a comment - 08/Dec/04 09:45 AM

"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)


Matthias Müller made changes - 08/Dec/04 09:45 AM
Attachment project.xml [ 13521 ]
Matthias Müller added a comment - 08/Dec/04 09:47 AM

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


Matthias Müller made changes - 08/Dec/04 09:47 AM
Attachment plugin.jelly [ 13522 ]
Felipe Leme added a comment - 08/Dec/04 10:43 AM

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


Felipe Leme made changes - 08/Dec/04 10:43 AM
Affects Version/s 1.6 [ 11001 ]
Fix Version/s 1.7 [ 11400 ]
Affects Version/s 1.5 [ 11000 ]
Matthias Müller added a comment - 08/Dec/04 11:04 AM

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.


Felipe Leme added a comment - 08/Dec/04 01:03 PM

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


Felipe Leme added a comment - 08/Dec/04 10:10 PM

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

So, could you please test it again?

– Felipe


Matthias Müller added a comment - 09/Dec/04 03:39 AM

I tested it and everything works fine.

Well done, thanks a lot

Matthias


Felipe Leme made changes - 09/Dec/04 05:03 AM
Status Open [ 1 ] Closed [ 6 ]
Resolution Fixed [ 1 ]