Maven 2.x Ear Plugin

Invalid application.xml generated

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 2.4
  • Fix Version/s: 2.4.1
  • Component/s: None
  • Labels:
    None
  • Environment:
    Maven 2.2.1
  • Number of attachments :
    1

Description

If a project description is specified in the pom.xml, then the plugin generates a corresponding <description>description from pom</description> element in the application.xml file.

Unfortunately, it places it in the wrong location according to the schema (for both J2EE 1.4 and JEE 5):

<display-name>artifact name</display-name>
<description>project description</description>
<module>
...

instead of:

<description>project description</description>
<display-name>artifact name</display-name>
<module>
...

This results in deployment failure on WebSphere.

Work around is to roll back to version 2.3.2 of the ear plugin.

Issue Links

Activity

Hide
Paul Merlin added a comment -

I confirm this issue with maven 2.2.1 and maven-ear-plugin 2.4.

Show
Paul Merlin added a comment - I confirm this issue with maven 2.2.1 and maven-ear-plugin 2.4.
Hide
Markku Saarela added a comment -

This bug blocks my usage of this version of plugin, because WebSphere 7 uses Eclipse WST tooling for parsing application.xml and deployment to WAS fails due to wrong order of elements. Version 2.3 has correct sequence of elements.

Show
Markku Saarela added a comment - This bug blocks my usage of this version of plugin, because WebSphere 7 uses Eclipse WST tooling for parsing application.xml and deployment to WAS fails due to wrong order of elements. Version 2.3 has correct sequence of elements.
Hide
Vincent Latombe added a comment -

Regression occured when introducing JEE6 support

Show
Vincent Latombe added a comment - Regression occured when introducing JEE6 support
Hide
Stephane Nicoll added a comment -

Yup, I suspected that too. I have created a 2.4.1 release to quickly fix that one.

Show
Stephane Nicoll added a comment - Yup, I suspected that too. I have created a 2.4.1 release to quickly fix that one.
Hide
Stephen Coy added a comment -

Be very careful with this because the order of the elements was reversed between J2EE 1.3 and J2EE 1.4.

This plugin currently works correctly for J2EE 1.3 ear files.

Show
Stephen Coy added a comment - Be very careful with this because the order of the elements was reversed between J2EE 1.3 and J2EE 1.4. This plugin currently works correctly for J2EE 1.3 ear files.
Hide
Vincent Latombe added a comment -

Please check the patch I attached, for me it fixes the problem.

Show
Vincent Latombe added a comment - Please check the patch I attached, for me it fixes the problem.
Hide
Stephane Nicoll added a comment -

Stephen, I know about that trust me I found out that myself while implementing the feature. Unfortunately, a regression was introduced recently. I will fix the code and add more comments so that people are more careful with this.

Show
Stephane Nicoll added a comment - Stephen, I know about that trust me I found out that myself while implementing the feature. Unfortunately, a regression was introduced recently. I will fix the code and add more comments so that people are more careful with this.
Hide
Stephane Nicoll added a comment -

Fixed. Deployed a new 2.4.1 snapshot

Show
Stephane Nicoll added a comment - Fixed. Deployed a new 2.4.1 snapshot
Hide
fabrice added a comment -

hi

Why do you not create a release instead of snapshot ?

Show
fabrice added a comment - hi Why do you not create a release instead of snapshot ?
Hide
Stephane Nicoll added a comment -

we will of course release it.

Show
Stephane Nicoll added a comment - we will of course release it.
Hide
Frank Griffin added a comment -

I'm still seeing this in 2.4.2:

[core.xml]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>dvd-ear</display-name>
<description>The Professional Software Services "dvd-ear" project creates the EARFile for the "dvd" project</description>
<module>
<ejb>dvd-ejb-1.0-SNAPSHOT.jar</ejb>
</module>
</application>

Show
Frank Griffin added a comment - I'm still seeing this in 2.4.2: [core.xml] <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd"> <application> <display-name>dvd-ear</display-name> <description>The Professional Software Services "dvd-ear" project creates the EARFile for the "dvd" project</description> <module> <ejb>dvd-ejb-1.0-SNAPSHOT.jar</ejb> </module> </application>
Hide
Stephen Coy added a comment - - edited

This is correct for J2EE 1.3.
J2EE 1.4 moved from DTDs to schemas where the order of the elements was made more consistent for all of the different deployment descriptors.
Perhaps you need to specify the J(2)EE version in the plugin config?

Show
Stephen Coy added a comment - - edited This is correct for J2EE 1.3. J2EE 1.4 moved from DTDs to schemas where the order of the elements was made more consistent for all of the different deployment descriptors. Perhaps you need to specify the J(2)EE version in the plugin config?

People

Vote (2)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: