Ant 此项目build-test.xml中不存在目标生成开发人员

Ant 此项目build-test.xml中不存在目标生成开发人员,ant,build,Ant,Build,在我的项目中有一组ant文件。 在一个ant文件中,它给出了上述错误 在build-test.xml文件中,一个ant目标依赖于“build-dev”目标,该目标位于同一目录中的build-dev.xml文件中 这有什么问题 在build-dev.xml中定义了以下目标 target name="build-dev" description="Compile the source code"> <echo>Building development classes ...<

在我的项目中有一组ant文件。 在一个ant文件中,它给出了上述错误

在build-test.xml文件中,一个ant目标依赖于“build-dev”目标,该目标位于同一目录中的build-dev.xml文件中

这有什么问题

在build-dev.xml中定义了以下目标

target name="build-dev" description="Compile the source code">
<echo>Building development classes ...</echo>
<foreach list="dev" param="type" target="build-core-type"/>
targetname=“build dev”description=“编译源代码”>
建设发展类。。。

在build-test.xml文件中,它被称为

<target name="instrument" depends="build-dev" description="Instrument the Application Source classes">
<mkdir dir="${instrument.classes.dir}"/>
<!-- Create the coverage directory if it does not exist -->
<mkdir dir="${coverage.dir}"/>

<echo>Instrumenting application classes under 'artemispm' package ...</echo>
<!-- Instrument only the class files in artemispm.* package,
     and place the instrumented classes in ${instrument.classes.dir} directory -->
<emma enabled="${emma.enabled}">
  <instr instrpathref="instrument.classpath"
         destdir="${instrument.classes.dir}"
         metadatafile="${coverage.dir}/metadata.emma"
         mode="copy" merge="true">
    <filter includes="artemispm.*"/>
  </instr>
</emma>

正在检测“Artemissm”包下的应用程序类。。。


你知道吗?

你在运行什么版本的Ant?我们刚刚从1.7.x迁移到1.9.2,不得不修复1.9中出现的一些错误。我认为部分原因是其他地方定义的属性现在必须提前预定义。我们也有多个构建文件,如果从顶级build.xml运行,通常一切都可以正常工作,因为其他文件都是从顶级执行/调用的。听起来您可能在一个较低级别的构建文件中,而该文件没有导入其他目标,包括构建开发目标。为什么要使用单独的文件?这可能值得研究。我会先这么做。如果您想解决这个问题,可以扩展代码段吗?build.xml中是否包含build dev和build test?或者其中一个包含另一个?如果您调用build.xml(运行ant时不带
-f
参数),那么build test和build dev都应该导入build.xml;如果运行
ant-f build-test.xml xxx
,则应将构建开发导入到构建测试中。