[ 
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

        

Reply via email to