comparison build.xml @ 2:5da2e67620f9

Upgrade to Ivy configuration and begin clean up of tests. Added FreeBSD license.
author smith@nwoca.org
date Tue, 25 Jan 2011 17:06:57 -0500
parents b6e94d49a9a9
children
comparison
equal deleted inserted replaced
1:b6e94d49a9a9 2:5da2e67620f9
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- You may freely edit this file. See commented blocks below for --> 2 <project name="html2wiki" default="default" basedir="."
3 <!-- some examples of how to customize the build. --> 3 xmlns:ivy="antlib:fr.jayasoft.ivy.ant"
4 <!-- (If you delete it and reopen the project it will be recreated.) --> 4 xmlns:ssdt="http://www.ssdt-ohio.org/ant/common">
5 <project name="html2wiki" default="default" basedir=".">
6 <description>Builds, tests, and runs the project html2wiki.</description> 5 <description>Builds, tests, and runs the project html2wiki.</description>
7 <import file="nbproject/build-impl.xml"/> 6 <import file="nbproject/build-impl.xml"/>
8 7
9 <property name="project.name" value="html2wiki" /> 8 <property file="../build.global"/>
10 <property name="project.version" value="0.1-0" /> 9 <property file="../../build.global"/>
11 10
12 <property file="../../build.global"/> 11 <property name="ssdt.devel.kit" value="${user.home}/.ssdt"/>
13 <property name="ssdt.home.dir" value="../../"/> 12 <property name="ssdt.devel.kit.src" value="http://hg.ssdt-ohio.org/browse/public/develkit"/>
14 <property name="tools.dir" value="${ssdt.home.dir}/Tools"/> 13 <mkdir dir="${ssdt.devel.kit}"/>
15 <import file="${tools.dir}/jalopy/ant/jalopy-ant.xml" optional="true"/> 14 <get dest="${ssdt.devel.kit}/bootstrap.xml"
16 <import file="${tools.dir}/checkstyle/ant/checkstyle-ant.xml"/> 15 src="${ssdt.devel.kit.src}/bootstrap.xml" usetimestamp="true" ignoreerrors="true"/>
17 16 <import file="${ssdt.devel.kit}/bootstrap.xml"/>
18 <import file="${tools.dir}/findbugs/ant/findbugs-ant.xml"/>
19 <!--
20 17
21 There exist several targets which are by default empty and which can be 18 <ssdt:require-ant file="ivy-ant.xml"/>
22 used for execution of your tasks. These targets are usually executed 19 <import file="${ssdt.devel.kit}/ivy-ant.xml"/>
23 before and after some main targets. They are:
24 20
25 -pre-init: called before initialization of project properties 21 <target name="-ivy-retrieve" depends="-ivy-define, -ant-contrib-define, -lib-path-init, -ivy-retrieve-custom"/>
26 -post-init: called after initialization of project properties
27 -pre-compile: called before javac compilation
28 -post-compile: called after javac compilation
29 -pre-compile-single: called before javac compilation of single file
30 -post-compile-single: called after javac compilation of single file
31 -pre-compile-test: called before javac compilation of JUnit tests
32 -post-compile-test: called after javac compilation of JUnit tests
33 -pre-compile-test-single: called before javac compilation of single JUnit test
34 -post-compile-test-single: called after javac compilation of single JUunit test
35 -pre-jar: called before JAR building
36 -post-jar: called after JAR building
37 -post-clean: called after cleaning build products
38
39 (Targets beginning with '-' are not intended to be called on their own.)
40
41 Example of inserting an obfuscator after compilation could look like this:
42
43 <target name="-post-compile">
44 <obfuscate>
45 <fileset dir="${build.classes.dir}"/>
46 </obfuscate>
47 </target>
48
49 For list of available properties check the imported
50 nbproject/build-impl.xml file.
51
52
53 Another way to customize the build is by overriding existing main targets.
54 The targets of interest are:
55
56 -init-macrodef-javac: defines macro for javac compilation
57 -init-macrodef-junit: defines macro for junit execution
58 -init-macrodef-debug: defines macro for class debugging
59 -init-macrodef-java: defines macro for class execution
60 -do-jar-with-manifest: JAR building (if you are using a manifest)
61 -do-jar-without-manifest: JAR building (if you are not using a manifest)
62 run: execution of project
63 -javadoc-build: Javadoc generation
64 test-report: JUnit report generation
65
66 An example of overriding the target for project execution could look like this:
67
68 <target name="run" depends="html2wiki-impl.jar">
69 <exec dir="bin" executable="launcher.exe">
70 <arg file="${dist.jar}"/>
71 </exec>
72 </target>
73
74 Notice that the overridden target depends on the jar target and not only on
75 the compile target as the regular run target does. Again, for a list of available
76 properties which you can use, check the target you are overriding in the
77 nbproject/build-impl.xml file.
78
79 -->
80 <target name="-pre-compile-single">
81 <antcall target="jalopy-single"/>
82 </target>
83
84 <target name="checkstyle" depends="compile,do-checkstyle"/>
85 <target name="findbugs" depends="compile,-do-findbugs"/>
86 <target name="findbugs-view" depends="compile,-do-findbugsViewer"/>
87 22
88 </project> 23 </project>