【问题标题】:ant failed when building project from sourceant 从源代码构建项目时失败
【发布时间】:2016-07-19 09:32:37
【问题描述】:

以下是 build.xml 文件中的代码抛出错误。我用谷歌搜索并找到了一些解决方案,例如..添加 ant contrib jar 文件来解决问题。即使在添加 jar 文件后也面临同样的问题。请看下面的代码。

<target name="copyHtdocs" depends="init">      
        <export srcUrl="${svn.htdocs.url}" revision="HEAD" destPath="${htdocs.dir}" />     
    <export srcUrl="${svn.htdocs.url}" destPath="${htdocs.dir}"/>
  </target>

添加 Ant-contrib jar 文件:-

<taskdef resource="net/sf/antcontrib/antcontrib.properties">
      <classpath>
        <pathelement location="${libs.dir}/ant-contrib-0.6.jar" />
      </classpath>
    </taskdef>

错误:-

C:\source\xxxx\xxxx\build.xml:156: Problem: failed to create task or type export
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

【问题讨论】:

    标签: ant build


    【解决方案1】:

    "export" 不是 ant-contrib 扩展的一部分

    我怀疑您正在尝试导出 git 存储库,因此我建议您使用此 ANT 任务:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-17
      • 1970-01-01
      • 2017-05-13
      相关资源
      最近更新 更多