You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "David J. M. Karlsen (JIRA)" <ji...@codehaus.org> on 2007/12/11 14:16:58 UTC

[jira] Created: (MNG-3316) Barfs at attribues named .*encoding

Barfs at attribues named .*encoding
-----------------------------------

                 Key: MNG-3316
                 URL: http://jira.codehaus.org/browse/MNG-3316
             Project: Maven 2
          Issue Type: Bug
          Components: POM::Encoding
    Affects Versions: 2.0.8
            Reporter: David J. M. Karlsen
            Priority: Blocker
         Attachments: examplepom.xml

With 2.0.8 a regression snuck in:

Please see attached pom for details.

In several of my project I use xdoclet-maven-plugin. In xdoclet-maven-plugin's configuration element there is an element, with an attribute xmlencoding="${variable}" (installed into my repository - NOT talking about building them).

If maven tries to read these pom's (from my repo) it barfs with an error message:
"
Project ID: some.group.id:myproject-war

Reason: Failed to build model from file 'c:\data\.m2\repository\some\group\id\myproject-war\1.3-SNAPSHOT\myproject-war-1.3-SNAPSHOT.pom'.
Error: '${ENCODING.DEFAULT}' for project some.group.id:myproject-war .
"

This did NOT happen before 2.0.8 - so it must be a regression.

What really puzzles me is why maven tries to parse these tags in the first place (as they are configurations for elements which should be of no value for this maven execution) - but I guess it was introduced when fixing MNG-2932, MNG-2025 and/or MNG-2254 without knowing any details.

As 2.0.8 fails the entire build (which works on 2.0.7) I'm rating this as Blocker.

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

        

[jira] Commented: (MNG-3316) Barfs at attribues named .*encoding

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_119366 ] 

Herve Boutemy commented on MNG-3316:
------------------------------------

ok, I was able to reproduce the problem.
I opened PLXUTILS-60, since the problem is in XmlStreamReader class in plexus-utils (and in fact in XmlReader class from Rome, which is the library I got the class from :) )

> Barfs at attribues named .*encoding
> -----------------------------------
>
>                 Key: MNG-3316
>                 URL: http://jira.codehaus.org/browse/MNG-3316
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM::Encoding
>    Affects Versions: 2.0.8
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: examplepom.xml, pom.xml
>
>
> With 2.0.8 a regression snuck in:
> Please see attached pom for details.
> In several of my project I use xdoclet-maven-plugin. In xdoclet-maven-plugin's configuration element there is an element, with an attribute xmlencoding="${variable}" (installed into my repository - NOT talking about building them).
> If maven tries to read these pom's (from my repo) it barfs with an error message:
> "
> Project ID: some.group.id:myproject-war
> Reason: Failed to build model from file 'c:\data\.m2\repository\some\group\id\myproject-war\1.3-SNAPSHOT\myproject-war-1.3-SNAPSHOT.pom'.
> Error: '${ENCODING.DEFAULT}' for project some.group.id:myproject-war .
> "
> This did NOT happen before 2.0.8 - so it must be a regression.
> What really puzzles me is why maven tries to parse these tags in the first place (as they are configurations for elements which should be of no value for this maven execution) - but I guess it was introduced when fixing MNG-2932, MNG-2025 and/or MNG-2254 without knowing any details.
> As 2.0.8 fails the entire build (which works on 2.0.7) I'm rating this as Blocker.

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

        

[jira] Commented: (MNG-3316) Barfs at attribues named .*encoding

Posted by "David J. M. Karlsen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_116497 ] 

David J. M. Karlsen commented on MNG-3316:
------------------------------------------

It should also be noted that if I remote the element containing the xmlencoding attribute the build will succeed.

> Barfs at attribues named .*encoding
> -----------------------------------
>
>                 Key: MNG-3316
>                 URL: http://jira.codehaus.org/browse/MNG-3316
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM::Encoding
>    Affects Versions: 2.0.8
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: examplepom.xml
>
>
> With 2.0.8 a regression snuck in:
> Please see attached pom for details.
> In several of my project I use xdoclet-maven-plugin. In xdoclet-maven-plugin's configuration element there is an element, with an attribute xmlencoding="${variable}" (installed into my repository - NOT talking about building them).
> If maven tries to read these pom's (from my repo) it barfs with an error message:
> "
> Project ID: some.group.id:myproject-war
> Reason: Failed to build model from file 'c:\data\.m2\repository\some\group\id\myproject-war\1.3-SNAPSHOT\myproject-war-1.3-SNAPSHOT.pom'.
> Error: '${ENCODING.DEFAULT}' for project some.group.id:myproject-war .
> "
> This did NOT happen before 2.0.8 - so it must be a regression.
> What really puzzles me is why maven tries to parse these tags in the first place (as they are configurations for elements which should be of no value for this maven execution) - but I guess it was introduced when fixing MNG-2932, MNG-2025 and/or MNG-2254 without knowing any details.
> As 2.0.8 fails the entire build (which works on 2.0.7) I'm rating this as Blocker.

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

        

[jira] Updated: (MNG-3316) Barfs at attribues named .*encoding

Posted by "David J. M. Karlsen (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David J. M. Karlsen updated MNG-3316:
-------------------------------------

    Attachment: pom.xml

Please see attached file for example.

> Barfs at attribues named .*encoding
> -----------------------------------
>
>                 Key: MNG-3316
>                 URL: http://jira.codehaus.org/browse/MNG-3316
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM::Encoding
>    Affects Versions: 2.0.8
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: examplepom.xml, pom.xml
>
>
> With 2.0.8 a regression snuck in:
> Please see attached pom for details.
> In several of my project I use xdoclet-maven-plugin. In xdoclet-maven-plugin's configuration element there is an element, with an attribute xmlencoding="${variable}" (installed into my repository - NOT talking about building them).
> If maven tries to read these pom's (from my repo) it barfs with an error message:
> "
> Project ID: some.group.id:myproject-war
> Reason: Failed to build model from file 'c:\data\.m2\repository\some\group\id\myproject-war\1.3-SNAPSHOT\myproject-war-1.3-SNAPSHOT.pom'.
> Error: '${ENCODING.DEFAULT}' for project some.group.id:myproject-war .
> "
> This did NOT happen before 2.0.8 - so it must be a regression.
> What really puzzles me is why maven tries to parse these tags in the first place (as they are configurations for elements which should be of no value for this maven execution) - but I guess it was introduced when fixing MNG-2932, MNG-2025 and/or MNG-2254 without knowing any details.
> As 2.0.8 fails the entire build (which works on 2.0.7) I'm rating this as Blocker.

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

        

[jira] Updated: (MNG-3316) Barfs at attribues named .*encoding

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy updated MNG-3316:
-------------------------------

         Assignee: Herve Boutemy
    Fix Version/s: 2.0.9

> Barfs at attribues named .*encoding
> -----------------------------------
>
>                 Key: MNG-3316
>                 URL: http://jira.codehaus.org/browse/MNG-3316
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM::Encoding
>    Affects Versions: 2.0.8
>            Reporter: David J. M. Karlsen
>            Assignee: Herve Boutemy
>            Priority: Blocker
>             Fix For: 2.0.9
>
>         Attachments: examplepom.xml, pom.xml
>
>
> With 2.0.8 a regression snuck in:
> Please see attached pom for details.
> In several of my project I use xdoclet-maven-plugin. In xdoclet-maven-plugin's configuration element there is an element, with an attribute xmlencoding="${variable}" (installed into my repository - NOT talking about building them).
> If maven tries to read these pom's (from my repo) it barfs with an error message:
> "
> Project ID: some.group.id:myproject-war
> Reason: Failed to build model from file 'c:\data\.m2\repository\some\group\id\myproject-war\1.3-SNAPSHOT\myproject-war-1.3-SNAPSHOT.pom'.
> Error: '${ENCODING.DEFAULT}' for project some.group.id:myproject-war .
> "
> This did NOT happen before 2.0.8 - so it must be a regression.
> What really puzzles me is why maven tries to parse these tags in the first place (as they are configurations for elements which should be of no value for this maven execution) - but I guess it was introduced when fixing MNG-2932, MNG-2025 and/or MNG-2254 without knowing any details.
> As 2.0.8 fails the entire build (which works on 2.0.7) I'm rating this as Blocker.

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

        

[jira] Commented: (MNG-3316) Barfs at attribues named .*encoding

Posted by "David J. M. Karlsen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_119231 ] 

David J. M. Karlsen commented on MNG-3316:
------------------------------------------

Se attachment number two (pom.xml) which is a cleanup of the one originally posted (examplepom.xml).

Parent pom has a correct and valid xml-header, I only refer to the encoding.default variable in configuration elements for plugins.

With 2.0.8
mvn clean should be sufficient to trigger:

zoidberg:/tmp# mvn clean
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: unknown

Reason: Failed to build model from file '/tmp/pom.xml'.
Error: '${ENCODING.DEFAULT}' for project unknown


[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Failed to build model from file '/tmp/pom.xml'.
Error: '${ENCODING.DEFAULT}' for project unknown
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:376)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:289)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
        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:597)
        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.ProjectBuildingException: Failed to build model from file '/tmp/pom.xml'.
Error: '${ENCODING.DEFAULT}' for project unknown
        at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1386)
        at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:474)
        at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:197)
        at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:548)
        at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:458)
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:362)
        ... 11 more
Caused by: java.io.UnsupportedEncodingException: ${ENCODING.DEFAULT}
        at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:52)
        at java.io.InputStreamReader.<init>(InputStreamReader.java:83)
        at hidden.org.codehaus.plexus.util.xml.XmlReader.prepareReader(XmlReader.java:479)
        at hidden.org.codehaus.plexus.util.xml.XmlReader.doRawStream(XmlReader.java:462)
        at hidden.org.codehaus.plexus.util.xml.XmlReader.<init>(XmlReader.java:179)
        at hidden.org.codehaus.plexus.util.xml.XmlReader.<init>(XmlReader.java:142)
        at hidden.org.codehaus.plexus.util.xml.XmlReader.<init>(XmlReader.java:123)
        at hidden.org.codehaus.plexus.util.xml.XmlStreamReader.<init>(XmlStreamReader.java:67)
        at hidden.org.codehaus.plexus.util.ReaderFactory.newXmlReader(ReaderFactory.java:113)
        at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1376)
        ... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Wed Jan 09 01:52:31 CET 2008
[INFO] Final Memory: 1M/4M
[INFO] ------------------------------------------------------------------------


> Barfs at attribues named .*encoding
> -----------------------------------
>
>                 Key: MNG-3316
>                 URL: http://jira.codehaus.org/browse/MNG-3316
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM::Encoding
>    Affects Versions: 2.0.8
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: examplepom.xml, pom.xml
>
>
> With 2.0.8 a regression snuck in:
> Please see attached pom for details.
> In several of my project I use xdoclet-maven-plugin. In xdoclet-maven-plugin's configuration element there is an element, with an attribute xmlencoding="${variable}" (installed into my repository - NOT talking about building them).
> If maven tries to read these pom's (from my repo) it barfs with an error message:
> "
> Project ID: some.group.id:myproject-war
> Reason: Failed to build model from file 'c:\data\.m2\repository\some\group\id\myproject-war\1.3-SNAPSHOT\myproject-war-1.3-SNAPSHOT.pom'.
> Error: '${ENCODING.DEFAULT}' for project some.group.id:myproject-war .
> "
> This did NOT happen before 2.0.8 - so it must be a regression.
> What really puzzles me is why maven tries to parse these tags in the first place (as they are configurations for elements which should be of no value for this maven execution) - but I guess it was introduced when fixing MNG-2932, MNG-2025 and/or MNG-2254 without knowing any details.
> As 2.0.8 fails the entire build (which works on 2.0.7) I'm rating this as Blocker.

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

        

[jira] Commented: (MNG-3316) Barfs at attribues named .*encoding

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3316?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_119217 ] 

Herve Boutemy commented on MNG-3316:
------------------------------------

can you attach pom.xml for some.group.id:myproject-war?
I suppose it starts with {code:xml}<?xml version="1.0" encoding="${ENCODING.DEFAULT}"?>{code}, isn't it?

> Barfs at attribues named .*encoding
> -----------------------------------
>
>                 Key: MNG-3316
>                 URL: http://jira.codehaus.org/browse/MNG-3316
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM::Encoding
>    Affects Versions: 2.0.8
>            Reporter: David J. M. Karlsen
>            Priority: Blocker
>         Attachments: examplepom.xml
>
>
> With 2.0.8 a regression snuck in:
> Please see attached pom for details.
> In several of my project I use xdoclet-maven-plugin. In xdoclet-maven-plugin's configuration element there is an element, with an attribute xmlencoding="${variable}" (installed into my repository - NOT talking about building them).
> If maven tries to read these pom's (from my repo) it barfs with an error message:
> "
> Project ID: some.group.id:myproject-war
> Reason: Failed to build model from file 'c:\data\.m2\repository\some\group\id\myproject-war\1.3-SNAPSHOT\myproject-war-1.3-SNAPSHOT.pom'.
> Error: '${ENCODING.DEFAULT}' for project some.group.id:myproject-war .
> "
> This did NOT happen before 2.0.8 - so it must be a regression.
> What really puzzles me is why maven tries to parse these tags in the first place (as they are configurations for elements which should be of no value for this maven execution) - but I guess it was introduced when fixing MNG-2932, MNG-2025 and/or MNG-2254 without knowing any details.
> As 2.0.8 fails the entire build (which works on 2.0.7) I'm rating this as Blocker.

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

        

[jira] Closed: (MNG-3316) Barfs at attribues named .*encoding

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy closed MNG-3316.
------------------------------

    Resolution: Fixed

fixed in r630415 in trunk and r630416 in 2.0.x branch

> Barfs at attribues named .*encoding
> -----------------------------------
>
>                 Key: MNG-3316
>                 URL: http://jira.codehaus.org/browse/MNG-3316
>             Project: Maven 2
>          Issue Type: Bug
>          Components: POM::Encoding
>    Affects Versions: 2.0.8
>            Reporter: David J. M. Karlsen
>            Assignee: Herve Boutemy
>            Priority: Blocker
>             Fix For: 2.0.9
>
>         Attachments: examplepom.xml, pom.xml
>
>
> With 2.0.8 a regression snuck in:
> Please see attached pom for details.
> In several of my project I use xdoclet-maven-plugin. In xdoclet-maven-plugin's configuration element there is an element, with an attribute xmlencoding="${variable}" (installed into my repository - NOT talking about building them).
> If maven tries to read these pom's (from my repo) it barfs with an error message:
> "
> Project ID: some.group.id:myproject-war
> Reason: Failed to build model from file 'c:\data\.m2\repository\some\group\id\myproject-war\1.3-SNAPSHOT\myproject-war-1.3-SNAPSHOT.pom'.
> Error: '${ENCODING.DEFAULT}' for project some.group.id:myproject-war .
> "
> This did NOT happen before 2.0.8 - so it must be a regression.
> What really puzzles me is why maven tries to parse these tags in the first place (as they are configurations for elements which should be of no value for this maven execution) - but I guess it was introduced when fixing MNG-2932, MNG-2025 and/or MNG-2254 without knowing any details.
> As 2.0.8 fails the entire build (which works on 2.0.7) I'm rating this as Blocker.

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