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.