0
votes

I'm trying to execute custom ANT target from within the build.xml file, but for some reason it gets ignored all the time. Below is my implementation:

<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>

For some reason whenever the build target is executed during "clean and build" of my project, nothing happens. Is there a specific target I'm supposed to use for the depends value?

1

1 Answers

1
votes

You need to override the build target and make it depend on both the original target (suite.build) and the extra target that you want to run (nbms).

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

For more information on how to customize the build, see harness/README located in your NetBeans installation.