我有一个用struts2制作的应用程序。
几天后,当我用maven编译它时,它不包含.war文件中的ApplicationResources.properties文件。
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>
<execution>
<id>native2ascii-8859_1</id>
<goals>
<goal>native2ascii</goal>
</goals>
<configuration>
<encoding>8859_1</encoding>
<includes>ApplicationResources.properties,
ApplicationResources_de.properties,
ApplicationResources_fr.properties,
ApplicationResources_nl.properties,
ApplicationResources_pt*.properties,
ApplicationResources_es*.properties</includes>
</configuration>
</execution>
答案 0 :(得分:0)
最后我解决了删除此文件的排除标记 p>的问题
<resource>
<directory>src/main/resources</directory>
<!-- <excludes>
<exclude>ApplicationResources*.properties</exclude>
</excludes>-->
<filtering>true</filtering>
</resource>