0
如果設置了系統屬性,我想運行'exec-maven-plugin'。我如何在Maven 3.x中完成此任務?如果在Maven 3.x中設置系統屬性ID,如何運行exec-maven-plugin?
例如,給定:
mvn clean install -DrunTheExec="yes"
那我該怎麼實現這個邏輯:
<!-- if $(runTheExec) == yes then run this plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
...
</plugin>
兩者都是很好的答案,但我會要挑這一個作爲答案,因爲默認選項是一個很好的補充。我會投兩個答案。 – TERACytE 2012-02-17 00:04:50