我在 mvn grails:war 执行中打包过滤的 context.xml 文件时遇到问题。
当你做 mvn war:war 时我让它工作,但这样做并不会创建我的 grails 应用程序战争。运行 mvn grails:war 时,我没有得到 context.xml 文件。这是 grails:war 目标没有运行 maven-war-plugin 的情况吗?我没有错误。任何帮助表示赞赏。这是我的相关pom设置:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<webResources>
<resource>
<directory>${basedir}/src/main/webapp/META-INF</directory>
<filtering>true</filtering>
<targetPath>META-INF</targetPath>
<includes>
<include>**/context.xml</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.grails</groupId>
<artifactId>grails-maven-plugin</artifactId>
<version>1.3.4</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>init</goal>
<goal>maven-clean</goal>
<goal>validate</goal>
<goal>config-directories</goal>
<goal>maven-compile</goal>
<goal>maven-test</goal>
<goal>maven-war</goal>
<goal>maven-functional-test</goal>
<goal>war</goal>
</goals>
</execution>
</executions>
</plugin>
...
<filters>
<filter>${basedir}/src/main/filters/dev.properties</filter>
</filters>