[ 
https://issues.apache.org/jira/browse/MRESOURCES-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17159009#comment-17159009
 ] 

Dennis Lundberg commented on MRESOURCES-171:
--------------------------------------------

Yes, there may be encoding problems for other file types besides properties 
files. In most cases that can be solved by the author by simply changing the 
encoding of those files to match the sourceEncoding for the project. For 
properties files that is simply not possible due to what the Java version you 
are using dictates.

I totally agree that Herves suggestion is the best and most flexible solution. 
Unfortunately it means adding new stuff to the POM, 
build/resources/resource/encoding. That means changes in maven-core instead of 
this plugin. It also means that it will not work for older versions of Maven 
and projects would need to migrate to POM version 5, which might not be 
possible because it is being used be downstream projects. I'm not saying we 
should not do that, but it will take time, a lot of time, before it is usable. 
In the mean time we need a solution for filtered properties files.

> ISO8859-1 properties files get changed into UTF-8 when filtered
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-171
>                 URL: https://issues.apache.org/jira/browse/MRESOURCES-171
>             Project: Maven Resources Plugin
>          Issue Type: Bug
>          Components: filtering
>            Reporter: Alex Collins
>            Priority: Minor
>         Attachments: filtering-bug.zip
>
>
> Create:
> src/main/resources/test.properties
> And add a ISO8859-1 character that is not ASCII or UTF-8, do not use \uXXXX 
> formatting.
> When adding this line:
> <resource><directory>src/main/resources</directory><filtering>true</filtering></resource>
> Expected:
> ISO8859-1 encoded file in jar.
> Actual:
> UTF-8 encoded file in jar.
> ---
> If there are any property files (which can only be ISO8859-1) they appear to 
> be converted into UTF-8 in the jar.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to