How Can I Change Behavior of Build Targets in Ant Build Script

The ant targets are defined in build-impl.xml that is located in nbproject directory in your project. This build_impl.xml is generated file therefore it MUST NOT be modified. When you need to change behavior of any of the ant build targets you should modify the build.xml file in your project directory. The build.xml file only imports the build-impl.xml by default. You can either override an existing target - copy it from build-impl.xml and modify - or you can provide your custom pre/post target (e.g. pre-init, post-init, pre-obfuscate, pre-compile, etc.) that we'll run before/after some main target.

The easiest way how to modify the build.xml - switch to Files view and double click the build.xml file under you project node. The file will open in Editor.

See also: build.xml file documentation in your project directory.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo