Conditional configuration in maven pom.xml
- by David Zhao
I'd like to ONLY exclude certain files in maven-war-plugin when property "skipCompress" set to true, I thought I could do something like this, but it doesn't work for me. BTW, I can't use profile to achieve this even I want to use skipCompress to turn on and off the compression in both development and deployment profiles.
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<if>
<not>
<equals arg1="${skipCompress}" arg2 = "true"/>
</not>
<then>
<warSourceExcludes>**/external/dojo/**/*.js</warSourceExcludes>
</then>
</if>
</configuration>
</plugin>
Thanks,
David