gmaven grails project not using maven-war-plugin
I'm having issues with a filtered context.xml file being packaged in a mvn grails:war execution.
I have it working when you do mvn war:war but doing that doesn't create my grails application war. When running mvn grails:war I don't get the context.xml file. Is this a case of the grails:war target not running the maven-war-plugin? I'm getting no errors. Any help is appreciated. Here are my relevant pom settings:
<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-function开发者_C百科al-test</goal>
<goal>war</goal>
</goals>
</execution>
</executions>
</plugin>
...
<filters>
<filter>${basedir}/src/main/filters/dev.properties</filter>
</filters>
grails:war uses grails command so generate war, so it will ignore anything you configured in the "maven war plugin". You will have to configure it within grails.
精彩评论