我有一个 xml 文件,其中包含必须用特定值替换的属性。所以我使用资源过滤来实现这一点。
资源结构如下:
src - main - java - resources - VAADIN -themes - UI.gwt.xml - webapp - WEB-INF
pom.xml 中的资源过滤使用情况:
<resources> <resource> <directory>${basedir}/src/main/resources</directory> <filtering>false</filtering> <includes> <include>**/VAADIN/themes/*</include> </includes> <excludes> <exclude>**/UI.gwt.xml</exclude> </excludes> </resource> <resource> <directory>${basedir}/src/main/resources</directory> <filtering>true</filtering> <includes> <include>**/UI.gwt.xml</include> </includes> <excludes> <exclude>**/VAADIN/themes/*</exclude> </excludes> </resource> </resources>
结果clean install
,我收到了带有 UI.gwt.xml 的 .war 文件,该文件具有替换的属性,但没有 VAADIN/themes 文件夹及其内容。如果我发表评论<resources>
,则 VAADIN/themes 会出现在 .war 文件中,但 UI.gwt.xml 没有特定值。
我的过滤配置有什么问题?