难道蚂蚁提供了一种方法来绕过依赖?

编程入门 行业动态 更新时间:2024-10-25 04:21:09
本文介绍了难道蚂蚁提供了一种方法来绕过依赖?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

中的build.xml有一个的测试的和的建立的目标。该的测试的目标显然取决于的建立的目标。

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

我怎么只能运行测试目标,暂时跳过编译,无需修改build.xml文件?

How can I run the test target only, temporarily skipping the compilation, without modifying the build.xml file ?

我这么问是因为编译太长,并保持了最新一个持续集成服务器;而我的单元测试的问题后追。

I'm asking because the compilation is too long, and kept up-to-date by a continuous integration server ; and I'm chasing after an issue with the unit tests.

推荐答案

没有,你不能没有修改构建文件跳过它。

No, you can't skip it without modifying the build file.

下面是我在我的项目做来解决这个问题。对于每一个公共的目标,我将创建在它前面的做 - 私人目标。私人目标没有相关性,而公共目标有做 - 目标作为一个依赖。

Here is what I do in my projects to solve this issue. For every public target I will create a private target with "do-" in front of it. The private target has no dependency, and the public target has the "do-" target as a dependency.

例如:

<target name="compile" depends="init, do-compile" description="Compiles all of the source code" /> <target name="do-compile"> <javac destdir="${classes.dir}" debug="true" encoding="ISO-8859-1"> <src refid="src.path" /> <include name="*.java" /> <classpath refid="external.libraries.classpath" /> </javac> </target>

更多推荐

难道蚂蚁提供了一种方法来绕过依赖?

本文发布于:2023-10-22 23:07:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1519000.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方法来   蚂蚁

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!