Does Ant offer a way to bypass dependency?

后端 未结 5 1967
刺人心
刺人心 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:17

    A well written build target will not need to rebuild anything if the code hasn't changed. So the fact that the test target depends on it should be largely irrelevant. If you run the build target twice in a row and it tries to rebuild something the second time, you might want to investigate why it is doing that.

    The simple way to avoid executing the target is to set the "unless" attribute of the target to the name of some property. If you then set this property on the command line when running Ant, it will bypass that target.

提交回复
热议问题