[
http://jira.codehaus.org/browse/MWAR-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=164763#action_164763 ]
Dennis Lundberg commented on MWAR-164:
--------------------------------------
I stumbled upon this issue today when using filteringDeploymentDescriptors.
Filtering the web.xml file should be able to use the encoding specified in the web.xml file itself. We specify ISO-8859-1 as the encoding in our web.xml, but it ends up scrambled into UTF-8 after being filtered.
This is our configuration:
{noformat}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-alpha-2</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
<archiveClasses>true</archiveClasses>
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
</configuration>
</plugin>
{noformat}
> suporting spesification of encoding to use when filtering resources
> -------------------------------------------------------------------
>
> Key: MWAR-164
> URL:
http://jira.codehaus.org/browse/MWAR-164> Project: Maven 2.x War Plugin
> Issue Type: Improvement
> Affects Versions: 2.1-alpha-1
> Reporter: kai lilleby
> Fix For: 2.1
>
>
> Quoting Hervé:
> {quote}
> Maven filtering provides an encoding parameter to set encoding used when
> reading/writing files. But war plugin uses null value, which means platform
> encoding... Sorry, encoding support won't be totally "free" ;)
> I added TODOs in the code.
> For web.xml and container config XML file, I set encoding to UTF-8, which is a
> better default value than platform encoding.
> For other filtered resources, you'll need to add an encoding attribute to
> o.a.m.model.Resource class, to let the user define which encoding he wants to
> use when filtering. Perhaps using project.build.sourceEncoding as a default
> value is a good idea.
> Seems like this is worth a Jira issue to track this new feature.
> {quote}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa-
For more information on JIRA, see:
http://www.atlassian.com/software/jira