build.xml

Sat, 26 Jan 2013 19:34:31 +0100

author
Mike Becker <universe@uap-core.de>
date
Sat, 26 Jan 2013 19:34:31 +0100
changeset 5
8ddf4af937d7
parent 1
f1d7de36b01e
permissions
-rw-r--r--

moved field methods to field class + added (parts of the) document handler

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

mercurial