1
<?xml version="1.0" encoding="UTF-8"?>
2
<!-- You may freely edit this file. See commented blocks below for -->
3
<!-- some examples of how to customize the build. -->
4
<!-- (If you delete it and reopen the project it will be recreated.) -->
5
<project name="StrutsExceptions" default="default" basedir=".">
6
<description>Builds, tests, and runs the project StrutsExceptions.</description>
7
<import file="nbproject/build-impl.xml"/>
9
<property name="nbroot" value="../.."/>
10
<import file="${nbroot}/nbbuild/templates/projectized.xml"/>
12
<target name="-pre-compile" depends="-init-proxy" unless="library.downloaded">
15
<get dest="lib/commons-httpclient-3.0.1.jar" src="http://mirrors.ibiblio.org/pub/mirrors/maven2/commons-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar"/>
16
<get dest="lib/commons-codec-1.3.jar" src="http://www.ibiblio.org/maven/commons-codec/jars/commons-codec-1.3.jar"/>
20
<target name="-post-clean">
28
There exist several targets which are by default empty and which can be
29
used for execution of your tasks. These targets are usually executed
30
before and after some main targets. They are:
32
-pre-init: called before initialization of project properties
33
-post-init: called after initialization of project properties
34
-pre-compile: called before javac compilation
35
-post-compile: called after javac compilation
36
-pre-compile-single: called before javac compilation of single file
37
-post-compile-single: called after javac compilation of single file
38
-pre-compile-test: called before javac compilation of JUnit tests
39
-post-compile-test: called after javac compilation of JUnit tests
40
-pre-compile-test-single: called before javac compilation of single JUnit test
41
-post-compile-test-single: called after javac compilation of single JUunit test
42
-pre-dist: called before jar building
43
-post-dist: called after jar building
44
-post-clean: called after cleaning build products
45
-pre-run-deploy: called before deploying
46
-post-run-deploy: called after deploying
48
Example of pluging an obfuscator after the compilation could look like
50
<target name="post-compile">
52
<fileset dir="${build.classes.dir}"/>
56
For list of available properties check the imported
57
nbproject/build-impl.xml file.
60
Other way how to customize the build is by overriding existing main targets.
61
The target of interest are:
63
init-macrodef-javac: defines macro for javac compilation
64
init-macrodef-junit: defines macro for junit execution
65
init-macrodef-debug: defines macro for class debugging
66
do-dist: jar archive building
67
run: execution of project
68
javadoc-build: javadoc generation
70
Example of overriding the target for project execution could look like
72
<target name="run" depends="<PROJNAME>-impl.jar">
73
<exec dir="bin" executable="launcher.exe">
74
<arg file="${dist.jar}"/>
78
Notice that overridden target depends on jar target and not only on
79
compile target as regular run target does. Again, for list of available
80
properties which you can use check the target you are overriding in
81
nbproject/build-impl.xml file.
85
<target name="javadoc-build"/>