【问题标题】:NetBeans ANT target not running?NetBeans ANT 目标未运行?
【发布时间】:2017-03-20 11:37:14
【问题描述】:

我正在尝试从 build.xml 文件中执行自定义 ANT 目标,但由于某种原因,它一直被忽略。下面是我的实现:

<project name="MyModuleSuite" basedir=".">
   <description>Builds the module suite MyModuleSuite.</description>
   <import file="nbproject/build-impl.xml"/>

   <target name="-post-compile" depends="build">
      <ant antfile="nbproject/build-impl.xml" target="nbms" />
   </target>
</project>

出于某种原因,每当在我的项目的“清理并构建” 期间执行 build 目标时,什么都没有发生。我应该为 depends 值使用特定目标吗?

【问题讨论】:

    标签: xml ant netbeans-platform


    【解决方案1】:

    您需要覆盖构建目标并使其依赖于原始目标 (suite.build) 和您要运行的额外目标 (nbms)。

    <target name="build" depends="suite.build,nbms">
    </target>
    

    有关如何自定义构建的详细信息,请参阅位于您的 NetBeans 安装中的harness/README

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2010-10-29
      • 1970-01-01
      • 2012-03-25
      • 2011-04-27
      • 2017-11-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多