pom.xml源文件(部分):
<execution>
<id>native2ascii-utf8</id>
<goals>
<goal>native2ascii</goal>
</goals>
<configuration>
<encoding>UTF8</encoding>
<includes>ApplicationResources_*.properties</includes>
<excludes>ApplicationResources.properties,
ApplicationResources_de*.properties,
ApplicationResources_fr*.properties,
ApplicationResources_nl*.properties,
ApplicationResources_pt*.properties,
ApplicationResources_es*.properties</excludes>
</configuration>
</execution>
<resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>ApplicationResources*.properties</exclude> </excludes> <filtering>true</filtering> </resource> <resource> <directory>target/resources</directory> <filtering>true</filtering> </resource> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource> </resources>
pom.xml修改后
<execution> <id>native2ascii-utf8</id> <goals> <goal>native2ascii</goal> </goals> <configuration> <encoding>UTF8</encoding> <includes>ApplicationResources_*.properties, *_zh*.properties</includes> <excludes>ApplicationResources.properties, ApplicationResources_de*.properties, ApplicationResources_fr*.properties, ApplicationResources_nl*.properties, ApplicationResources_pt*.properties, ApplicationResources_es*.properties</excludes> </configuration> </execution>
<resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>ApplicationResources*.properties</exclude> <exclude>*_zh*.properties</exclude> </excludes> <filtering>true</filtering> </resource> <resource> <directory>target/resources</directory> <filtering>true</filtering> </resource> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource> </resources>
在native2ascii-utf8中添加: displaytag_zh*.properties
在resources中添加:<exclude>displaytag_zh*.properties</exclude>