Issue Details (XML | Word | Printable)

Key: MNG-3838
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Shane Isbell
Reporter: Espen Wiborg
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Maven 2 & 3

[regression] Some POMs fail to parse if the are subject to ModelContainer joining

Created: 13/Nov/08 03:18 PM   Updated: 22/Dec/08 06:18 AM   Resolved: 22/Dec/08 06:18 AM
Return to search
Component/s: POM
Affects Version/s: 3.0-alpha-1
Fix Version/s: 3.0-alpha-1

Time Tracking:
Not Specified

File Attachments: 1. Zip Archive example.zip (2 kB)

Issue Links:
Related
 

Complexity: Intermediate


 Description  « Hide

With Maven 3.0-SNAPSHOT built from svn r713815, the POM in the attachment fails to parse with the output in fail.log. The interesting bit is reproduced here:

java.io.IOException: org.codehaus.plexus.util.xml.pull.XmlPullParserException: end tag name </plugin> must match start tag name <dependencies> from line 12 (position: START_TAG seen ...<dependencies></plugin>... @12:24) :

<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns="http://maven.apache.org/POM/4.0.0" >
<modelVersion>4.0.0</modelVersion>
<groupId>testing</groupId>
<artifactId>testing</artifactId>
<version>1</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<dependencies></plugin>
<plugin>
[...lots more...]

As far as I can make out, the problem is that the ModelContainer joining carried out in ModelTransformerContext.transform (on line 269) fails to take into account that it may leave the wrapper collection empty. Such an empty collection then leads ModelMarshaller astray later.

The example POM is a stripped-down version of the org.apache.cxf:cfx-parent:2.1 POM, which is how I discovered the issue.

This broke sometime after 2008-10-13.



Benjamin Bentmann made changes - 14/Nov/08 10:58 AM
Field Original Value New Value
Link This issue is related to MNG-3821 [ MNG-3821 ]
Benjamin Bentmann added a comment - 14/Nov/08 11:19 AM

The example POM has been added to the IT suite, thanks very much Espen!


Benjamin Bentmann made changes - 14/Nov/08 11:19 AM
Affects Version/s 3.0 [ 13142 ]
Affects Version/s 3.0-alpha-1 [ 13143 ]
Brett Porter made changes - 17/Dec/08 06:32 PM
Fix Version/s 3.0-alpha-3 [ 14719 ]
Summary Some POMs fail to parse if the are subject to ModelContainer joining [regression] Some POMs fail to parse if the are subject to ModelContainer joining
Benjamin Bentmann added a comment - 22/Dec/08 06:18 AM

Fixed in r727855.


Benjamin Bentmann made changes - 22/Dec/08 06:18 AM
Assignee Shane Isbell [ sisbell ]
Resolution Fixed [ 1 ]
Fix Version/s 3.0-alpha-3 [ 14719 ]
Fix Version/s 3.0-alpha-1 [ 13143 ]
Status Open [ 1 ] Closed [ 6 ]