maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bentmann (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MNG-4667) Maven 2.2.1 XML parser fails to parse a UTF-8 POM that begins with a BOM
Date Thu, 06 May 2010 10:08:12 GMT

    [ http://jira.codehaus.org/browse/MNG-4667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=220164#action_220164
] 

Benjamin Bentmann commented on MNG-4667:
----------------------------------------

While it seems not too hard to fix the parser, the consequences of enabling those POMs to
be deployed are rather severe as all other/older Maven versions will not be able to parse
those POMs during dependency resolution. In other words, allowing BOMs in the deployed POMs
has a similar effect of changing the POM version/format...

> Maven 2.2.1 XML parser fails to parse a UTF-8 POM that begins with a BOM
> ------------------------------------------------------------------------
>
>                 Key: MNG-4667
>                 URL: http://jira.codehaus.org/browse/MNG-4667
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: POM::Encoding
>    Affects Versions: 2.2.1
>            Reporter: Maria Catherine Tan
>         Attachments: pom.xml
>
>
> I've seen a lot of issues related to this that were closed because they're a duplicate
of MNG-2254 but I think the fix for MNG-2254 doesn't fix this issue.
> I'm using maven 2.2.1 and the build failed when the UTF-8 POM begins with a BOM.
> Here's the log when running clean install
> {noformat}
> Reason: Parse error reading POM. Reason: only whitespace content allowed before start
tag and not \uef (position: START_DOCUMENT seen \uef... @1:1)  for project unknown at /home/marica/quick/pom.xml
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.reactor.MavenExecutionException: Parse error reading POM. Reason: only
whitespace content allowed before start tag and not \uef (position: START_DOCUMENT seen \uef...
@1:1)  for project unknown at /home/marica/quick/pom.xml
> 	at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> 	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.project.InvalidProjectModelException: Parse error reading
POM. Reason: only whitespace content allowed before start tag and not \uef (position: START_DOCUMENT
seen \uef... @1:1)  for project unknown at /home/marica/quick/pom.xml
> 	at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1610)
> 	at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1571)
> 	at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:506)
> 	at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200)
> 	at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604)
> 	at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487)
> 	at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391)
> 	... 12 more
> Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: only whitespace
content allowed before start tag and not \uef (position: START_DOCUMENT seen \uef... @1:1)

> 	at hidden.org.codehaus.plexus.util.xml.pull.MXParser.parseProlog(MXParser.java:1528)
> 	at hidden.org.codehaus.plexus.util.xml.pull.MXParser.nextImpl(MXParser.java:1407)
> 	at hidden.org.codehaus.plexus.util.xml.pull.MXParser.next(MXParser.java:1105)
> 	at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:3911)
> 	at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1606)
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message