【发布时间】:2016-03-24 10:50:15
【问题描述】:
我遇到一个问题,当我通过 Intellij 15.0.2 的 Maven 构建运行时,Maven 资源插件没有将我的属性过滤到我的文件中。当我从 Windows 命令行运行 mvn compile 时,它确实有效。我的插件配置是:
<properties>
<prop1>aaa</prop1>
<prop2>bbb</prop2>
</properties>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<configuration>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>file1</include>
<include>file2</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
【问题讨论】:
-
嗯,这很有趣(也很奇怪)。您能否发布更多关于您的 Intellij 版本、操作系统以及最重要的是您在 iJ 中使用的运行配置(屏幕截图?)的信息?我从来没有遇到过这个问题。
-
您是否告诉 Intellij 将构建操作委托给 mvn?
标签: maven intellij-idea properties filtering maven-resources-plugin