annotate build.xml @ 0:f159d9d17589

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