1 <?xml version="1.0" encoding="UTF-8"?>
4 Copyright © 2013 František Kučera (frantovo.cz)
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 <!-- You may freely edit this file. See commented blocks below for -->
21 <!-- some examples of how to customize the build. -->
22 <!-- (If you delete it and reopen the project it will be recreated.) -->
23 <!-- By default, only the Clean and Build commands use this build script. -->
24 <!-- Commands such as Run, Debug, and Test only use this build script if -->
25 <!-- the Compile on Save feature is turned off for the project. -->
26 <!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
27 <!-- in the project's Project Properties dialog box.-->
28 <project name="sql-dk" default="default" basedir=".">
29 <description>Builds, tests, and runs the project sql-dk.</description>
30 <import file="nbproject/build-impl.xml"/>
33 There exist several targets which are by default empty and which can be
34 used for execution of your tasks. These targets are usually executed
35 before and after some main targets. They are:
37 -pre-init: called before initialization of project properties
38 -post-init: called after initialization of project properties
39 -pre-compile: called before javac compilation
40 -post-compile: called after javac compilation
41 -pre-compile-single: called before javac compilation of single file
42 -post-compile-single: called after javac compilation of single file
43 -pre-compile-test: called before javac compilation of JUnit tests
44 -post-compile-test: called after javac compilation of JUnit tests
45 -pre-compile-test-single: called before javac compilation of single JUnit test
46 -post-compile-test-single: called after javac compilation of single JUunit test
47 -pre-jar: called before JAR building
48 -post-jar: called after JAR building
49 -post-clean: called after cleaning build products
51 (Targets beginning with '-' are not intended to be called on their own.)
53 Example of inserting an obfuscator after compilation could look like this:
55 <target name="-post-compile">
57 <fileset dir="${build.classes.dir}"/>
61 For list of available properties check the imported
62 nbproject/build-impl.xml file.
65 Another way to customize the build is by overriding existing main targets.
66 The targets of interest are:
68 -init-macrodef-javac: defines macro for javac compilation
69 -init-macrodef-junit: defines macro for junit execution
70 -init-macrodef-debug: defines macro for class debugging
71 -init-macrodef-java: defines macro for class execution
72 -do-jar-with-manifest: JAR building (if you are using a manifest)
73 -do-jar-without-manifest: JAR building (if you are not using a manifest)
74 run: execution of project
75 -javadoc-build: Javadoc generation
76 test-report: JUnit report generation
78 An example of overriding the target for project execution could look like this:
80 <target name="run" depends="sql-dk-impl.jar">
81 <exec dir="bin" executable="launcher.exe">
82 <arg file="${dist.jar}"/>
86 Notice that the overridden target depends on the jar target and not only on
87 the compile target as the regular run target does. Again, for a list of available
88 properties which you can use, check the target you are overriding in the
89 nbproject/build-impl.xml file.
93 <target name="-pre-compile">
94 <exec executable="./version-info.sh" output="data/info/globalcode/sql/dk/version.txt"/>
95 <exec executable="./help-generator.sh" output="data/info/globalcode/sql/dk/help.txt"/>
98 <target name="-post-jar">
99 <exec executable="./bash-completion.sh" output="dist/bash-completion.sh"/>