Conditional configuration in maven pom.xml

Posted by David Zhao on Stack Overflow See other posts from Stack Overflow or by David Zhao
Published on 2012-04-13T23:24:23Z Indexed on 2012/04/13 23:29 UTC
Read the original article Hit count: 366

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about maven-3

Related posts about maven-war-plugin