mojohaus / jaxb2-maven-plugin

JAXB2 Maven Plugin
https://www.mojohaus.org/jaxb2-maven-plugin/
Apache License 2.0
106 stars 77 forks source link

Don't warn about different file.encoding #42

Closed robert-schaft-hon closed 8 years ago

robert-schaft-hon commented 8 years ago

Normally, you set project.build.sourceEncoding to tell maven and all its plugins that your sources files are in that encoding. jaxb2 honors this setting, too. But it annoyingly warns if this encoding differs from the platform encoding: Configured encoding [UTF-8] differs from encoding given in system property 'file.encoding' [Cp1252] There is no clean way to have a platform independent build without that warning on windows or unix. Therefore this patch switches the warning off.

lennartj commented 8 years ago

This PR could possibly break builds where non-UTF8/non-ASCII encodings are used, and where the JAXB compiler would need to use the native platform encoding. I would advise sending a PR to the JAXB compiler instead of the plugin.

robert-schaft-hon commented 8 years ago

I don't suggest to change the behaviour. I just suggest to switch of the irrelevant warning (see my patch). @lennartj: Could you enlighten me, how a flag that just enables or disables warning output could break any builds? The code of the jaxb2-maven-plugin detects and issues the warning independent of the compiler output. What could be possibly changed at the Jaxb compiler to prevent the maven-plugin to issue this warning?