[ 
https://jira.codehaus.org/browse/MRESOURCES-175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=327511#comment-327511
 ] 

Emeric MARTINEAU commented on MRESOURCES-175:
---------------------------------------------

Hi,

Is not a but, I not also a feature !

Maven upto 3.0.x use maven-filtering library as part of Maven project.
Class to load file contains properties is "PropertyUtils" (loadPropertyFile is 
method used).

If you look this class, you find :
    public static Properties loadPropertyFile( File propFile, Properties 
baseProps )
        throws IOException
    {
        if ( !propFile.exists() )
        {
            throw new FileNotFoundException( propFile.toString() );
        }
        final Properties fileProps = new Properties();
        final FileInputStream inStream = new FileInputStream( propFile );
        ...
        
You can see file is open by using "FileInputStream" but without encoding 
parameter.

I think you may create a feature request for this on 
http://jira.codehaus.org/browse/MNG.
Cause all plugin using filtering have this issue (I try with assembly plugin).

Regards,

Emeric
                
> Bad encoding in filtering
> -------------------------
>
>                 Key: MRESOURCES-175
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-175
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>          Components: filtering
>    Affects Versions: 2.6
>         Environment: jdk1.6.0_43
>            Reporter: Pavel Zinoviev
>            Priority: Blocker
>
> I have a resources
> <resources>
>  <resource>
>   <directory>src/main/resources</directory>
>   <filtering>true</filtering>                         
>   <excludes>
>    <exclude>filters/**.*</exclude>
>   </excludes>
>  </resource>
> </resources>
> and
> <filters>
>  <filter>src/main/resources/filters/filter-ru.properties</filter>             
>         
> </filters>
> in maven-resource-plugin defined UTF-8 encoding.
> but result of 'mvn resources:resources' is unreadable... It's not utf-8. May 
> be loading of filter file performed with some default encoding?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to