maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl-Heinz Marbaise (JIRA)" <j...@codehaus.org>
Subject [jira] (MEAR-159) encoding when filtering resources
Date Sat, 21 Feb 2015 18:34:18 GMT

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

Karl-Heinz Marbaise commented on MEAR-159:
------------------------------------------

Hi Alex, are you able to check an SNAPSHOT if the change is now doing what intended to be.
Based on your example project i can say it works.
If i check the original file:
{code}
$ hexdump src/main/application/META-INF/test.xml
0000000 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31
0000010 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 77 69
0000020 6e 64 6f 77 73 2d 31 32 35 31 22 3f 3e 0d 0a 3c
0000030 74 65 73 74 20 6e 61 6d 65 3d 22 d2 e5 f1 f2 22
0000040 2f 3e
0000042
{code}
and the created file with encoding set as in the example:
{code}
$ hexdump target/maven-ear-plugin-test-project-resources-encoding-99.0/META-INF/test.xml
0000000 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31
0000010 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 77 69
0000020 6e 64 6f 77 73 2d 31 32 35 31 22 3f 3e 0d 0a 3c
0000030 74 65 73 74 20 6e 61 6d 65 3d 22 d2 e5 f1 f2 22
0000040 2f 3e
0000042
{code}
If i don't set the encoding in the pom file i will get a wrong result (which is based on the
default encoding):
{code}
$ hexdump target/maven-ear-plugin-test-project-resources-encoding-99.0/META-INF/test.xml
0000000 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31
0000010 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 77 69
0000020 6e 64 6f 77 73 2d 31 32 35 31 22 3f 3e 0d 0a 3c
0000030 74 65 73 74 20 6e 61 6d 65 3d 22 ef bf bd ef bf
0000040 bd ef bf bd ef bf bd 22 2f 3e
000004a
{code}
I have provided an development version which can be seen here:
{code}
Uploading: https://repository.apache.org/content/repositories/snapshots/org/apache/maven/plugins/maven-ear-plugin/2.11-SNAPSHOT/maven-ear-plugin-2.11-20150221.183218-97.jar
Uploaded: https://repository.apache.org/content/repositories/snapshots/org/apache/maven/plugins/maven-ear-plugin/2.11-SNAPSHOT/maven-ear-plugin-2.11-20150221.183218-97.jar
(90 KB at 31.9 KB/sec)
Uploading: https://repository.apache.org/content/repositories/snapshots/org/apache/maven/plugins/maven-ear-plugin/2.11-SNAPSHOT/maven-ear-plugin-2.11-20150221.183218-97.pom
Uploaded: https://repository.apache.org/content/repositories/snapshots/org/apache/maven/plugins/maven-ear-plugin/2.11-SNAPSHOT/maven-ear-plugin-2.11-20150221.183218-97.pom
(10 KB at 4.1 KB/sec)
{code}

> encoding when filtering resources
> ---------------------------------
>
>                 Key: MEAR-159
>                 URL: https://jira.codehaus.org/browse/MEAR-159
>             Project: Maven Ear Plugin
>          Issue Type: Improvement
>    Affects Versions: 2.8
>            Reporter: Alex Kaigorodov
>            Assignee: Karl-Heinz Marbaise
>             Fix For: 2.10.1
>
>         Attachments: maven-ear-plugin-2.10-test-project-resources-encoding.zip, maven-ear-plugin-test-project-resources-encoding.zip
>
>
> Resources of our ear project contain non-ascii characters. This xml-files in windows-1251.
We use filtering resources when building ear.
> Building in the dev environment (Windows, file.encoding = Cp1251) goes well. The build
at the CI-server (Linux, file.encoding = UTF-8) non-ascii characters in xml-files are replaced
with a sequence of bytes 'efbfbd'.
> It would be convenient to be able to specify the encoding for the ear resources, similar
to how we can do it in the maven-resources-plugin.
> Sample project attached.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Mime
View raw message