We're updating the issue view to help you get more done. 

Merging listeners if the root (<web-app>) of web.xml contains the xmlns attribute is buggy

Description

See: http://cargo.996258.n3.nabble.com/Maven-plugin-merging-listeners-in-web-xml-is-buggy-td17307.html

In version 1.4.2 of the maven plugin there seems to be a bug when merging web.xml files containing multiple <listenerelements if the root (<web-app>) of web.xml contains the xmlns attrubute.

To reproduce the bug:
Create a junit test based on org.codehaus.cargo.module.webapp.merge.WebXmlListenerMergerTest and just modify the file1 and file2 Strings in "testMergeListeners()" so that the <web-appelements contain the xmlns attribute (e.g. xmlns="http://java.sun.com/xml/ns/javaee"). The test should fail.

Fix:
After some debugging I came to the conclusion that the tags array in org.codehaus.cargo.module.webapp.WebXml22Type is incomplete and adding new WebXmlTag(this, "listener-class"), to it fixes the bug for me.

Marcin Piela

Status

Assignee

Savas Ali Tokmen

Reporter

S. Ali Tokmen

Components

Fix versions

Affects versions

1.4.2

Priority

Major