Bedingte Konfiguration in maven pom.xml

Ich möchte NUR ausschließen, bestimmte Dateien mit Hilfe der maven-war-plugin, wenn die Eigenschaft "skipCompress" auf true gesetzt ist. Ich dachte, die folgende Spezifikation funktionieren könnte, aber es funktioniert nicht. BTW, ich kann kein Profil, das zu erreichen. Ich will skipCompress ein-und ausschalten der Kompression in sowohl die Entwicklung und Bereitstellung von Profilen.

<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>

Dank,

David

  • Sie gab die Antwort selbst. Verwenden Sie profile für Art.
InformationsquelleAutor David Zhao | 2012-04-13
Schreibe einen Kommentar