You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2022/04/06 20:34:00 UTC
[jira] [Deleted] (MWAR-451) ISO8859-1 properties files get changed into UTF-8 when filtered
[ https://issues.apache.org/jira/browse/MWAR-451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov deleted MWAR-451:
--------------------------------
> ISO8859-1 properties files get changed into UTF-8 when filtered
> ---------------------------------------------------------------
>
> Key: MWAR-451
> URL: https://issues.apache.org/jira/browse/MWAR-451
> Project: Maven WAR Plugin
> Issue Type: New Feature
> Reporter: Dennis Lundberg
> Priority: Major
>
> This issue is similar to https://issues.apache.org/jira/browse/MRESOURCES-171, but for filtering web resources in maven-war-plugin.
> We add properties files that have ISO-8859-1 encoding, as per the Java 8 requirements, as web resources in a war project. When these resources are filtered they get converted to the encoding specified by the project.build.sourceEncoding. There is a parameter resourceEncoding that can be used to change the encoding for web reources, but it applies to all web resource files which is not always what you want.
> Here is the configuration used:
> {code:xml}
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <version>3.3.2</version>
> <configuration>
> <webResources>
> <resource>
> <targetPath>WEB-INF/classes</targetPath>
> <filtering>true</filtering>
> <directory>src/main/webapp/WEB-INF/classes</directory>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
> </build>
> {code}
> We propose to add a new parameter propertiesEncoding to the AbstractWarMojo. If the value of this parameter is set and filtering is enabled and a web resource file is a properties file, then the value of the parameter is used as encoding when filtering the file.
> If the parameter is not specified it defaults to project.build.sourceEncoding, thus keeping the current behavior of the plugin unchanged.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)