Hi Baptiste,

Seems like Maven 2 still has a bug in XML encoding support, incorrectly using 
platform encoding when it should detect the encoding from the plugin.xml file.
If Maven 2 can read such a malformed XML file, the bug is in Maven 2, not Maven 
3: I'll have to track and fix it. Please open a Jira issue with your plugin jar.

FYI, encoding of an XML file is fully self-contained and doesn't depend from 
any Maven configuration: your plugin.xml is simply malformed.

If you want to understand more on XML encoding detection, you can read [1].

Regards,

Hervé


[1] http://docs.codehaus.org/display/MAVENUSER/XML+encoding


----- Mail Original -----
De: "Baptiste MATHUS" <[email protected]>
À: "Maven Developers List" <[email protected]>
Envoyé: Dimanche 27 Juin 2010 13h47:18 GMT +01:00 Amsterdam / Berlin / Berne / 
Rome / Stockholm / Vienne
Objet: Fail to read plugin descriptor: mvn3 regression?

Hi all,

For some time now, I'm having a build failure problem on maven3 which
doesn't happen in maven2. I've been willing to file an issue about it for
long, but I wanted to try and identify a bit more the potential culprit
before.
(I'm post this question here on the mvn-dev ML, since maven3 is not yet ga
released, but if you feel I should use users ml, just let me know).

I think the problem might be related to some encoding determination.

We have a decent big build (~25 modules) that uses an old internal mojo we
wrote long ago. This build just runs fine with mvn2, on windows and Unix.
But it will only run fine on windows with mvn3. Unix/mvn3 gives the
following error:
[ERROR] Failed to parse plugin descriptor for
ourgroupid:ourplugin:1.1.0.alpha04
(/ic/.m2/repositories/${env.JOB_NAME}/repository/ourgroupid/ourplugin/1.1.0.alpha04/maven-foundation-plugin-1.1.0.alpha04.jar):
null: PlexusConfigurationException: MalformedInputException -> [Help 1]
(full stack: http://pastebin.com/WdweEFvh)

Some hint:

   - the current being-built project is fully utf8 encoded
   - the plugin that makes this build crashes is an independent project (not
   built in the same reactor/multimodule build I mean), and was encoded
   iso-8859-15

I'm wondering: how does maven choose the encoding to read the plugin.xml
file? Does it use the corresponding project sourceEncoding as I think it
should (or maybe the plugin.xml is always generated with the same
encoding)?

According to the logs above, I'm thinking of issues like that:

   - Maven would incorrectly use the platform encoding? (since it works on
   windows, but not on Unix, and cp1252 is almost entirely compatible with
   latin9)
   - Maven is using the calling project encoding to parse the plugin.xml?
      - I'm more betting on something like this one, since the full stack
      shows some conversion about utf8.


Please let me know what you think. Some weeks ago, I tried to create a
testcase project, but didn't manage to extract only the failing part. With
your hints, I guess I could maybe do it. If not, at least, I'll finally file
an issue.

Thanks

-- 
Baptiste

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to