Skip to content

Commit 063f8bc

Browse files
author
kitfox
committed
Adding NB build file
git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk@8 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b
1 parent d4da998 commit 063f8bc

File tree

2 files changed

+323
-0
lines changed

2 files changed

+323
-0
lines changed

build-NBUtil.xml

+316
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,316 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project name="NetBeans support tasks">
3+
<!--description>
4+
Collection of common tasks used by many other projects.
5+
</description-->
6+
7+
<property name="jvm.debug" location="C:\bin\jdk1.6.0\fastdebug\bin\java.exe"/>
8+
9+
<taskdef resource="proguard/ant/task.properties" classpath="C:\java\proguard4.0beta\lib\proguard.jar" />
10+
11+
<target name="compile-selected-files" depends="init">
12+
<fail unless="files">Must set property 'files'</fail>
13+
<mkdir dir="${classes.main.dir}"/>
14+
<javac debug="true" destdir="${classes.main.dir}" srcdir="${src.main.dir}" includes="${files}" source="1.5" fork="yes">
15+
<compilerarg value="-Xlint"/>
16+
<classpath>
17+
<path refid="path.classpath"/>
18+
</classpath>
19+
</javac>
20+
</target>
21+
22+
<target name="compile-selected-files-test" depends="jar">
23+
<fail unless="files">Must set property 'files'</fail>
24+
<mkdir dir="${classes.test.dir}"/>
25+
<javac debug="true" destdir="${classes.test.dir}" srcdir="${src.test.dir}" includes="${files}" source="1.5" fork="yes">
26+
<compilerarg value="-Xlint"/>
27+
<classpath>
28+
<pathelement path="${classes.main.dir}"/>
29+
<path refid="path.classpath"/>
30+
</classpath>
31+
</javac>
32+
</target>
33+
34+
<target name="run-selected-files" depends="compile" description="Run Single File">
35+
<fail unless="classname">Must set property 'classname'</fail>
36+
37+
<java fork="true" classname="${classname}">
38+
<jvmarg value="-ea"/>
39+
<jvmarg value="-Djogl.verbose"/>
40+
<!--jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/-->
41+
<classpath>
42+
<pathelement path="${classes.main.dir}"/>
43+
<path refid="path.classpath"/>
44+
</classpath>
45+
</java>
46+
</target>
47+
48+
<target name="run-selected-files-test" depends="compile-test" description="Run Single File">
49+
<fail unless="classname">Must set property 'classname'</fail>
50+
51+
<!--java fork="true" classname="${classname}" jvm="${project.run.jvm}"-->
52+
<java fork="true" classname="${classname}">
53+
<jvmarg value="-ea"/>
54+
<jvmarg value="-Djogl.verbose"/>
55+
<!--jvmarg value="-agentlib:hprof=file=snapshot.hprof,format=b"/-->
56+
<!--jvmarg value="-XX:+HeapDumpOnOutOfMemoryError"/-->
57+
<classpath>
58+
<pathelement path="${classes.main.dir}"/>
59+
<pathelement path="${classes.test.dir}"/>
60+
<path refid="path.classpath"/>
61+
</classpath>
62+
</java>
63+
</target>
64+
65+
<target name="debug" depends="init,compile" if="netbeans.home" description="Debug Project">
66+
<nbjpdastart name="${project.debug.name}" addressproperty="jpda.address" transport="dt_socket">
67+
<sourcepath>
68+
<path refid="path.sourcepath.debug"/>
69+
</sourcepath>
70+
<classpath>
71+
<pathelement path="${classes.main.dir}"/>
72+
<path refid="path.classpath"/>
73+
</classpath>
74+
</nbjpdastart>
75+
76+
<java fork="true" classname="${project.debug.mainClass}" jvm="${jvm.debug}">
77+
<jvmarg value="-ea"/>
78+
<jvmarg value="-Xdebug"/>
79+
<jvmarg value="-Xnoagent"/>
80+
<jvmarg value="-Djava.compiler=none"/>
81+
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
82+
<classpath>
83+
<pathelement path="${classes.main.dir}"/>
84+
<path refid="path.classpath"/>
85+
</classpath>
86+
</java>
87+
</target>
88+
89+
<target name="debug-selected-files" depends="init,compile" if="netbeans.home" description="Debug a Single File">
90+
<fail unless="classname">Must set property 'classname'</fail>
91+
<nbjpdastart name="${classname}" addressproperty="jpda.address" transport="dt_socket">
92+
<sourcepath>
93+
<path refid="path.sourcepath.debug"/>
94+
</sourcepath>
95+
<classpath>
96+
<pathelement path="${classes.main.dir}"/>
97+
<path refid="path.classpath"/>
98+
</classpath>
99+
</nbjpdastart>
100+
101+
<java fork="true" classname="${classname}" jvm="${jvm.debug}">
102+
<jvmarg value="-Xdebug"/>
103+
<jvmarg value="-Xnoagent"/>
104+
<jvmarg value="-Djava.compiler=none"/>
105+
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
106+
<classpath>
107+
<pathelement path="${classes.main.dir}"/>
108+
<path refid="path.classpath"/>
109+
</classpath>
110+
</java>
111+
</target>
112+
113+
<target name="debug-selected-files-test" depends="init,compile" if="netbeans.home" description="Debug a Single File">
114+
<fail unless="classname">Must set property 'classname'</fail>
115+
<nbjpdastart name="${classname}" addressproperty="jpda.address" transport="dt_socket">
116+
<sourcepath>
117+
<path refid="path.sourcepath.debug"/>
118+
</sourcepath>
119+
<classpath>
120+
<pathelement path="${classes.main.dir}"/>
121+
<pathelement path="${classes.test.dir}"/>
122+
<path refid="path.classpath"/>
123+
</classpath>
124+
</nbjpdastart>
125+
126+
<java fork="true" classname="${classname}" jvm="${jvm.debug}">
127+
<jvmarg value="-Xdebug"/>
128+
<jvmarg value="-Xnoagent"/>
129+
<jvmarg value="-Djava.compiler=none"/>
130+
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
131+
<classpath>
132+
<pathelement path="${classes.main.dir}"/>
133+
<pathelement path="${classes.test.dir}"/>
134+
<path refid="path.classpath"/>
135+
</classpath>
136+
</java>
137+
</target>
138+
139+
<target name="debug-fix" depends="init" if="netbeans.home" description="Recompile a file during a debug session and reload it into the debugger without stopping it">
140+
<javac destdir="${classes.main.dir}" srcdir="${src.main.dir}" debug="true" >
141+
<classpath>
142+
<path refid="path.classpath"/>
143+
</classpath>
144+
<include name="${fix.file}.java"/>
145+
</javac>
146+
147+
<nbjpdareload>
148+
<fileset dir="${classes.main.dir}">
149+
<include name="${fix.file}.class"/>
150+
</fileset>
151+
</nbjpdareload>
152+
</target>
153+
154+
<target name="test-selected-files" depends="init">
155+
<fail unless="classname">Must set property 'classname'</fail>
156+
<echo message="test selected files not implemented yet"/>
157+
</target>
158+
159+
<target name="profile" depends="init,compile" description="Profile project">
160+
<fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail>
161+
<nbprofiledirect>
162+
<classpath>
163+
<pathelement path="${classes.main.dir}"/>
164+
<pathelement path="${classes.test.dir}"/>
165+
<path refid="path.classpath"/>
166+
</classpath>
167+
</nbprofiledirect>
168+
169+
<java classname="${project.run.mainClass}" fork="true">
170+
<jvmarg value="${profiler.info.jvmargs.agent}"/>
171+
<jvmarg value="-ea"/>
172+
<jvmarg value="-Xmx256M"/>
173+
<jvmarg value="-Djogl.verbose"/>
174+
<classpath>
175+
<pathelement path="${classes.main.dir}"/>
176+
<pathelement path="${classes.test.dir}"/>
177+
<path refid="path.classpath"/>
178+
</classpath>
179+
</java>
180+
</target>
181+
182+
<target name="profile-single" depends="compile" description="Profile single file">
183+
<fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail>
184+
<fail unless="profile.class">Class to profile must be specified.</fail>
185+
<!--echo message="*************main*************"/-->
186+
187+
<nbprofiledirect>
188+
<classpath>
189+
<pathelement path="${classes.main.dir}"/>
190+
<pathelement path="${classes.test.dir}"/>
191+
<path refid="path.classpath"/>
192+
</classpath>
193+
</nbprofiledirect>
194+
195+
<java classname="${profile.class}" fork="true">
196+
<jvmarg value="${profiler.info.jvmargs.agent}"/>
197+
<jvmarg value="-ea"/>
198+
<jvmarg value="-Xmx256M"/>
199+
<classpath>
200+
<pathelement path="${classes.main.dir}"/>
201+
<pathelement path="${classes.test.dir}"/>
202+
<path refid="path.classpath"/>
203+
</classpath>
204+
</java>
205+
</target>
206+
207+
<target name="profile-single-test" depends="compile" description="Profile single file">
208+
<fail unless="netbeans.home">This target can only run inside the NetBeans IDE.</fail>
209+
<fail unless="profile.class">Class to profile must be specified.</fail>
210+
<!--echo message="*************test*************"/-->
211+
212+
<nbprofiledirect>
213+
<classpath>
214+
<pathelement path="${classes.main.dir}"/>
215+
<pathelement path="${classes.test.dir}"/>
216+
<path refid="path.classpath"/>
217+
</classpath>
218+
</nbprofiledirect>
219+
220+
<java classname="${profile.class}" fork="true">
221+
<jvmarg value="${profiler.info.jvmargs.agent}"/>
222+
<jvmarg value="-ea"/>
223+
<jvmarg value="-Xmx256M"/>
224+
<classpath>
225+
<pathelement path="${classes.main.dir}"/>
226+
<pathelement path="${classes.test.dir}"/>
227+
<path refid="path.classpath"/>
228+
</classpath>
229+
</java>
230+
</target>
231+
232+
<target name="generateKey" depends="init" description="Create a key to sign our jar files with.">
233+
<delete file="${key.location}"/>
234+
<genkey alias="${key.user}" storepass="${key.password}" keystore="${key.location}" validity="1000" verbose="true">
235+
<dname>
236+
<param name="CN" value="Mark McKay, [email protected]"/>
237+
<param name="OU" value="kitfox.com"/>
238+
<param name="O" value="kitfox"/>
239+
<param name="L" value="Toronto"/>
240+
<param name="S" value="Ontario"/>
241+
<param name="C" value="CA"/>
242+
</dname>
243+
</genkey>
244+
</target>
245+
246+
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask" classpath="C:\dev\cvs.sourceforge.net\findbugs\lib\findbugs-ant.jar" />
247+
<taskdef name="findbugs-viewer" classname="edu.umd.cs.findbugs.anttask.FindBugsViewerTask" classpath="C:\dev\cvs.sourceforge.net\findbugs\lib\findbugs-ant.jar" />
248+
249+
<property name="findbugs.home" location="C:\dev\cvs.sourceforge.net\findbugs" />
250+
<property name="findbugs.bugReport" location="bcel-fb.xml" />
251+
252+
<target name="findbugs" depends="jar">
253+
<findbugs home="${findbugs.home}" output="xml" outputFile="${findbugs.bugReport}" >
254+
<auxClasspath>
255+
<path refid="path.classpath"/>
256+
</auxClasspath>
257+
<sourcePath path="${src.dir}"/>
258+
<class location="${project.jar}" />
259+
</findbugs>
260+
</target>
261+
262+
<target name="findbugs-viewer" depends="jar">
263+
<findbugs-viewer home="${findbugs.home}" look="native" loadbugs="${findbugs.bugReport}"/>
264+
</target>
265+
266+
<target name="javadoc" depends="init,compile" description="Javadoc for my API.">
267+
<javadoc destdir="${javadoc.dir}" packagenames="*">
268+
<sourcepath>
269+
<path refid="path.sourcepath"/>
270+
</sourcepath>
271+
<classpath>
272+
<pathelement path="${classes.dir}"/>
273+
<path refid="path.classpath"/>
274+
</classpath>
275+
</javadoc>
276+
277+
<zip destfile="${javadoc.zip}" basedir="${javadoc.dir}" compress="true">
278+
<exclude name="${javadoc.zip}"/>
279+
</zip>
280+
</target>
281+
282+
<target name="javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init">
283+
<nbbrowse file="${javadoc.dir}/index.html"/>
284+
</target>
285+
286+
<target name="-test" depends="init,compile" description="runs a series of tests on svgSalamander">
287+
<junit printsummary="withOutAndErr" haltonfailure="true">
288+
<formatter type="plain" usefile="false"/>
289+
<test name="${test.suite}" />
290+
<classpath>
291+
<pathelement location="${classes.dir}"/>
292+
<path refid="path.classpath"/>
293+
</classpath>
294+
295+
</junit>
296+
</target>
297+
298+
<target name="smoketest" depends="init" description="runs smoke tests on svgSalamander">
299+
<antcall target="-test">
300+
<param name="test.suite" value="SmokeTests"/>
301+
</antcall>
302+
</target>
303+
304+
<target name="checkintest" depends="init" description="runs check in tests on svgSalamander">
305+
<antcall target="-test">
306+
<param name="test.suite" value="CheckInTests"/>
307+
</antcall>
308+
</target>
309+
310+
<target name="releasetest" depends="init" description="runs release tests on svgSalamander">
311+
<antcall target="-test">
312+
<param name="test.suite" value="ReleaseTests"/>
313+
</antcall>
314+
</target>
315+
316+
</project>

svg-core/nbproject/project.xml

+7
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
<target>build</target>
5050
</action>
5151
</ide-actions>
52+
<export>
53+
<type>jar</type>
54+
<location>build/jar/svg-salamander-core.jar</location>
55+
<build-target>build</build-target>
56+
</export>
5257
<view>
5358
<items>
5459
<source-folder style="packages">
@@ -86,6 +91,7 @@
8691
<compilation-unit>
8792
<package-root>src/main/java</package-root>
8893
<classpath mode="compile">lib/library/ant.jar;lib/library/javacc.jar;lib/library/junit.jar</classpath>
94+
<built-to>build/jar/svg-salamander-core.jar</built-to>
8995
<source-level>1.5</source-level>
9096
</compilation-unit>
9197
<compilation-unit>
@@ -95,6 +101,7 @@
95101
<compilation-unit>
96102
<package-root>src/test/java</package-root>
97103
<unit-tests/>
104+
<classpath mode="compile">lib/library/ant.jar;lib/library/javacc.jar;lib/library/junit.jar;build/jar/svg-salamander-core.jar</classpath>
98105
<source-level>1.5</source-level>
99106
</compilation-unit>
100107
<compilation-unit>

0 commit comments

Comments
 (0)