maven-antrun-plugin skip target if any of two possible conditions holds
问题 I can pass two properties A and B to maven via mvn test -DA=true or mvn test -DB=true If either A or B is defined i want a target to be skipped. I found it was possible when only A was considered like this: <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version> <executions> <execution> <id>skiptThisConditionally</id> <phase>test</phase> <configuration> <target name="anytarget" unless="${A}"> <echo message="This should be skipped if A or B holds" /> </target> <