Does Ant offer a way to bypass dependency?

后端 未结 5 1965
刺人心
刺人心 2021-02-19 03:38

The build.xml has a test and a build target. The test target obviously depends on the build target.

How can I run the test target on

5条回答
  •  执念已碎
    2021-02-19 04:01

    Use the unless attribute.

    
    

    If you don't want "test" to run, just

    ant -Ddont.run.tests=true

    It should be undefined if you want the tests to run. Ant just checks for whether it's defined at all. Also, there's an if attribute that does the converse.

    Here's an article on the both.

提交回复
热议问题