没有设置属性时,使构建失败的简单方法是什么?
问题描述:
如标题中所述,如果未在命令行中设置属性,如何以一种最简单的方式修改pom.xml
以使其失败.
As stated in the title, how can I modify - in the simplest manner possible - a pom.xml
in order to make it fails if a property is not set in the command line.
例如,当mvn clean package -Dfoo=bar
成功时,mvn clean package
将失败.
For example, mvn clean package
will fail, when mvn clean package -Dfoo=bar
will succeed.
I'm looking for something like the <prerequisites/>
tag in the pom.xml
(except that <prerequisites/>
only allow me to check the Maven version)...