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="MethodHandle" default="default" basedir=".">
6 <description>Builds, tests, and runs the project MethodHandle.</description>
7 <import file="nbproject/build-impl.xml"/>
8
9 <!-- For some reason, the run.jvmargs property does not expand from this file.
10 It must be placed in nbproject/project.properties as follows:
11 run.jvmargs=-Xbootclasspath/a:${build.classes.dir}:${local.junit.jar}
12 -->
13 <property name="--broken--run.jvmargs" value="-Xbootclasspath/a:${build.classes.dir}:${local.junit.jar}"/>
14
15 <property name="javadoc.includes" value="java/dyn/*.java"/>
16
17 <!--- copy dependency class files straight into the output JAR -->
18 <target name="-post-jar">
19 <jar destfile="${dist.jar}"
20 update="true" compress="true">
21 <zipfileset src="${reference.AnonymousClass.jar}"/>
22 </jar>
23 </target>
24
25 <!--- build a bundle of the tests -->
26 <target name="-post-compile-test">
27 <echo message="make build/test-classes.jar from ${build.test.classes.dir}"/>
28 <jar compress="${jar.compress}" jarfile="${build.dir}/test-classes.jar">
29 <fileset dir="${build.test.classes.dir}"/>
30 </jar>
31 </target>
32
33 <target depends="init" name="-javadoc-build">
34 <mkdir dir="${dist.javadoc.dir}"/>
35 <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" executable="${platform.javadoc}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"
36 verbose="yes"
37 public="yes"
38 >
39 <classpath>
40 <path path="${javac.classpath}"/>
41 </classpath>
42 <fileset dir="${src.src.dir}" excludes="${excludes}" includes="${javadoc.includes}">
43 <filename name="**/*.java"/>
44 </fileset>
45 </javadoc>
46 </target>
47
48
49 <!-- FOR TRACING:
50 <target name="-init-macrodef-junit">
51 <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
52 <attribute default="${includes}" name="includes"/>
53 <attribute default="${excludes}" name="excludes"/>
54 <attribute default="**" name="testincludes"/>
55 <sequential>
56 <echo message="junit jvmargs: ${run.jvmargs}"/>
57 <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${platform.java}" showoutput="true"
58 >
59 <batchtest todir="${build.test.results.dir}">
60 <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
61 <filename name="@{testincludes}"/>
62 </fileset>
63 </batchtest>
64 <classpath>
65 <path path="${run.test.classpath}"/>
66 </classpath>
67 <syspropertyset>
68 <propertyref prefix="test-sys-prop."/>
69 <mapper from="test-sys-prop.*" to="*" type="glob"/>
70 </syspropertyset>
71 <formatter type="brief" usefile="false"/>
72 <formatter type="xml"/>
73 <jvmarg line="${run.jvmargs}"/>
74 </junit>
75 </sequential>
76 </macrodef>
77 </target>
78 -->
79
80 <!--
81
82 There exist several targets which are by default empty and which can be
83 used for execution of your tasks. These targets are usually executed
84 before and after some main targets. They are:
85
86 -pre-init: called before initialization of project properties
87 -post-init: called after initialization of project properties
88 -pre-compile: called before javac compilation
89 -post-compile: called after javac compilation
90 -pre-compile-single: called before javac compilation of single file
91 -post-compile-single: called after javac compilation of single file
92 -pre-compile-test: called before javac compilation of JUnit tests
93 -post-compile-test: called after javac compilation of JUnit tests
94 -pre-compile-test-single: called before javac compilation of single JUnit test
95 -post-compile-test-single: called after javac compilation of single JUunit test
96 -pre-jar: called before JAR building
97 -post-jar: called after JAR building
98 -post-clean: called after cleaning build products
99
100 (Targets beginning with '-' are not intended to be called on their own.)
101
102 Example of inserting an obfuscator after compilation could look like this:
103
104 <target name="-post-compile">
105 <obfuscate>
106 <fileset dir="${build.classes.dir}"/>
107 </obfuscate>
108 </target>
109
110 For list of available properties check the imported
111 nbproject/build-impl.xml file.
112
113
114 Another way to customize the build is by overriding existing main targets.
115 The targets of interest are:
116
117 -init-macrodef-javac: defines macro for javac compilation
118 -init-macrodef-junit: defines macro for junit execution
119 -init-macrodef-debug: defines macro for class debugging
120 -init-macrodef-java: defines macro for class execution
121 -do-jar-with-manifest: JAR building (if you are using a manifest)
122 -do-jar-without-manifest: JAR building (if you are not using a manifest)
123 run: execution of project
124 -javadoc-build: Javadoc generation
125 test-report: JUnit report generation
126
127 An example of overriding the target for project execution could look like this:
128
129 <target name="run" depends="MethodHandle-impl.jar">
130 <exec dir="bin" executable="launcher.exe">
131 <arg file="${dist.jar}"/>
132 </exec>
133 </target>
134
135 Notice that the overridden target depends on the jar target and not only on
136 the compile target as the regular run target does. Again, for a list of available
137 properties which you can use, check the target you are overriding in the
138 nbproject/build-impl.xml file.
139
140 -->
141 </project>