1*cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?> 2*cdf0e10cSrcweir<!-- You may freely edit this file. See commented blocks below for --> 3*cdf0e10cSrcweir<!-- some examples of how to customize the build. --> 4*cdf0e10cSrcweir<!-- (If you delete it and reopen the project it will be recreated.) --> 5*cdf0e10cSrcweir<!-- By default, only the Clean and Build commands use this build script. --> 6*cdf0e10cSrcweir<!-- Commands such as Run, Debug, and Test only use this build script if --> 7*cdf0e10cSrcweir<!-- the Compile on Save feature is turned off for the project. --> 8*cdf0e10cSrcweir<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> 9*cdf0e10cSrcweir<!-- in the project's Project Properties dialog box.--> 10*cdf0e10cSrcweir<project name="ConvwatchGUIProject" default="default" basedir="."> 11*cdf0e10cSrcweir <description>Builds, tests, and runs the project ConvwatchGUIProject.</description> 12*cdf0e10cSrcweir <import file="nbproject/build-impl.xml"/> 13*cdf0e10cSrcweir <!-- 14*cdf0e10cSrcweir 15*cdf0e10cSrcweir There exist several targets which are by default empty and which can be 16*cdf0e10cSrcweir used for execution of your tasks. These targets are usually executed 17*cdf0e10cSrcweir before and after some main targets. They are: 18*cdf0e10cSrcweir 19*cdf0e10cSrcweir -pre-init: called before initialization of project properties 20*cdf0e10cSrcweir -post-init: called after initialization of project properties 21*cdf0e10cSrcweir -pre-compile: called before javac compilation 22*cdf0e10cSrcweir -post-compile: called after javac compilation 23*cdf0e10cSrcweir -pre-compile-single: called before javac compilation of single file 24*cdf0e10cSrcweir -post-compile-single: called after javac compilation of single file 25*cdf0e10cSrcweir -pre-compile-test: called before javac compilation of JUnit tests 26*cdf0e10cSrcweir -post-compile-test: called after javac compilation of JUnit tests 27*cdf0e10cSrcweir -pre-compile-test-single: called before javac compilation of single JUnit test 28*cdf0e10cSrcweir -post-compile-test-single: called after javac compilation of single JUunit test 29*cdf0e10cSrcweir -pre-jar: called before JAR building 30*cdf0e10cSrcweir -post-jar: called after JAR building 31*cdf0e10cSrcweir -post-clean: called after cleaning build products 32*cdf0e10cSrcweir 33*cdf0e10cSrcweir (Targets beginning with '-' are not intended to be called on their own.) 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir Example of inserting an obfuscator after compilation could look like this: 36*cdf0e10cSrcweir 37*cdf0e10cSrcweir <target name="-post-compile"> 38*cdf0e10cSrcweir <obfuscate> 39*cdf0e10cSrcweir <fileset dir="${build.classes.dir}"/> 40*cdf0e10cSrcweir </obfuscate> 41*cdf0e10cSrcweir </target> 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir For list of available properties check the imported 44*cdf0e10cSrcweir nbproject/build-impl.xml file. 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir Another way to customize the build is by overriding existing main targets. 48*cdf0e10cSrcweir The targets of interest are: 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir -init-macrodef-javac: defines macro for javac compilation 51*cdf0e10cSrcweir -init-macrodef-junit: defines macro for junit execution 52*cdf0e10cSrcweir -init-macrodef-debug: defines macro for class debugging 53*cdf0e10cSrcweir -init-macrodef-java: defines macro for class execution 54*cdf0e10cSrcweir -do-jar-with-manifest: JAR building (if you are using a manifest) 55*cdf0e10cSrcweir -do-jar-without-manifest: JAR building (if you are not using a manifest) 56*cdf0e10cSrcweir run: execution of project 57*cdf0e10cSrcweir -javadoc-build: Javadoc generation 58*cdf0e10cSrcweir test-report: JUnit report generation 59*cdf0e10cSrcweir 60*cdf0e10cSrcweir An example of overriding the target for project execution could look like this: 61*cdf0e10cSrcweir 62*cdf0e10cSrcweir <target name="run" depends="ConvwatchGUIProject-impl.jar"> 63*cdf0e10cSrcweir <exec dir="bin" executable="launcher.exe"> 64*cdf0e10cSrcweir <arg file="${dist.jar}"/> 65*cdf0e10cSrcweir </exec> 66*cdf0e10cSrcweir </target> 67*cdf0e10cSrcweir 68*cdf0e10cSrcweir Notice that the overridden target depends on the jar target and not only on 69*cdf0e10cSrcweir the compile target as the regular run target does. Again, for a list of available 70*cdf0e10cSrcweir properties which you can use, check the target you are overriding in the 71*cdf0e10cSrcweir nbproject/build-impl.xml file. 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir --> 74*cdf0e10cSrcweir</project> 75