1 <?xml version="1.0" encoding="UTF-8"?>
2 <project basedir=".." name="jpf-core-IDE">
5 <pathelement location="build/main"/>
6 <pathelement location="build/peers"/>
7 <pathelement location="build/annotations"/>
8 <pathelement location="build/tests"/>
10 <include name="lib/*.jar"/>
14 <sourcepath id="source.path">
15 <pathelement location="src/main"/>
16 <pathelement location="src/peers"/>
20 <property name="testrunner" value="gov.nasa.jpf.util.test.TestJPF"/>
22 <property name="testrunner" value="gov.nasa.jpf.tool.RunTest"/>
25 <!-- TODO: do we really have to duplicate this for each container dir? -->
26 <!-- TODO: !!! automatic recompile doesn't work, this is a NetBeans/Ant problem !!! -->
28 <!-- (more info: http://www.netbeans.org/kb/articles/freeform-config.html#runsingle) -->
30 <target name="test-project">
31 <!-- we need to set the formatter 'usefile' attribute
32 or the NB test runner will not show any tests -->
33 <property name="junit.usefile" value="false"/>
34 <ant antfile="build.xml" inheritall="true" target="test"/>
38 <!-- 'main' targets -->
39 <target name="run-selected-main">
40 <fail unless="run.class">Must set property 'run.class'</fail>
41 <ant antfile="build.xml" inheritall="false" target="compile"/>
42 <input message="please enter arguments" addproperty="arg.input"/>
43 <java classname="${run.class}" failonerror="true" fork="true">
45 <path refid="base.path"/>
48 <arg line="${arg.input}"/>
52 <target name="debug-selected-main">
53 <fail unless="debug.class">Must set property 'debug.class'</fail>
54 <ant antfile="build.xml" inheritall="false" target="compile"/>
57 <path refid="base.path"/>
59 <sourcepath id="sp.main">
60 <path refid="source.path"/>
64 <nbjpdastart addressproperty="jpda.address" name="${debug.class}" transport="dt_socket">
65 <classpath refid="cp.main"/>
66 <sourcepath refid="sp.main"/>
69 <input message="please enter arguments" addproperty="arg.input"/>
71 <java classname="${debug.class}" fork="true" >
72 <classpath refid="cp.main"/>
74 <jvmarg value="-Xdebug"/>
75 <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
76 <arg line="${arg.input}"/>
81 <!-- 'example' targets -->
82 <target name="run-selected-example">
83 <fail unless="run.class">Must set property 'run.class'</fail>
84 <ant antfile="build.xml" inheritall="false" target="compile"/>
85 <input message="please enter arguments" addproperty="arg.input"/>
86 <java classname="${run.class}" failonerror="true" fork="true">
88 <pathelement location="build/examples"/>
89 <path refid="base.path"/>
92 <arg line="${arg.input}"/>
96 <target name="debug-selected-example">
97 <fail unless="debug.class">Must set property 'debug.class'</fail>
98 <ant antfile="build.xml" inheritall="false" target="compile"/>
100 <path id="cp.examples">
101 <pathelement location="build/examples"/>
102 <path refid="base.path"/>
104 <sourcepath id="sp.examples">
105 <pathelement location="src/examples"/>
106 <path refid="source.path"/>
110 <nbjpdastart addressproperty="jpda.address" name="${debug.class}" transport="dt_socket">
111 <classpath refid="cp.examples"/>
112 <sourcepath refid="sp.examples"/>
115 <input message="please enter arguments" addproperty="arg.input"/>
117 <java classname="${debug.class}" fork="true" >
118 <classpath refid="cp.examples"/>
119 <jvmarg value="-ea"/>
120 <jvmarg value="-Xdebug"/>
121 <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
122 <arg line="${arg.input}"/>
126 <target name="run-selected-example-jpf">
127 <fail unless="jpf.config">Must set property 'jpf.config'</fail>
128 <ant antfile="build.xml" inheritall="false" target="compile"/>
130 <java classname="gov.nasa.jpf.JPF" failonerror="true" fork="true">
131 <arg value="${jpf.config}"/>
133 <pathelement location="build/examples"/>
134 <path refid="base.path"/>
139 <target name="debug-selected-example-jpf">
140 <fail unless="jpf.config">Must set property 'jpf.config'</fail>
141 <ant antfile="build.xml" inheritall="false" target="compile"/>
143 <path id="cp.examples">
144 <pathelement location="build/examples"/>
145 <path refid="base.path"/>
147 <sourcepath id="sp.examples">
148 <pathelement location="src/examples"/>
149 <path refid="source.path"/>
152 <nbjpdastart addressproperty="jpda.address" name="${jpf.config}" transport="dt_socket">
153 <classpath refid="cp.examples"/>
154 <sourcepath refid="sp.examples"/>
157 <java classname="gov.nasa.jpf.JPF" fork="true">
158 <classpath refid="cp.examples"/>
159 <jvmarg value="-ea"/>
160 <jvmarg value="-Xdebug"/>
161 <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
163 <arg value="${jpf.config}"/>
168 <!-- 'test' targets -->
169 <target name="run-selected-test">
170 <fail unless="run.class">Must set property 'run.class'</fail>
171 <ant antfile="build.xml" inheritall="false" target="compile"/>
172 <input message="please enter arguments" addproperty="arg.input"/>
173 <java classname="${testrunner}" failonerror="true" fork="true">
175 <pathelement location="build/tests"/>
176 <path refid="base.path"/>
178 <jvmarg value="-ea"/>
179 <arg value="${run.class}"/>
180 <arg line="${arg.input}"/>
184 <target name="debug-selected-test">
185 <fail unless="debug.class">Must set property 'debug.class'</fail>
186 <ant antfile="build.xml" inheritall="false" target="compile"/>
189 <pathelement location="build/tests"/>
190 <path refid="base.path"/>
192 <sourcepath id="sp.tests">
193 <pathelement location="src/tests"/>
194 <path refid="source.path"/>
197 <nbjpdastart addressproperty="jpda.address" name="${debug.class}" transport="dt_socket">
198 <classpath refid="cp.tests"/>
199 <sourcepath refid="sp.tests"/>
202 <input message="please enter arguments" addproperty="arg.input"/>
204 <java classname="${testrunner}" fork="true">
205 <classpath refid="cp.tests"/>
206 <jvmarg value="-ea"/>
207 <jvmarg value="-Xdebug"/>
208 <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
209 <arg value="${debug.class}"/>
210 <arg line="${arg.input}"/>
214 <target name="run-selected-test-jpf">
215 <fail unless="jpf.config">Must set property 'jpf.config'</fail>
216 <ant antfile="build.xml" inheritall="false" target="compile"/>
217 <java classname="gov.nasa.jpf.JPF" failonerror="true" fork="true">
218 <jvmarg value="-ea"/>
219 <arg value="${jpf.config}"/>
221 <pathelement location="build/tests"/>
222 <path refid="base.path"/>
227 <target name="debug-selected-test-jpf">
228 <fail unless="jpf.config">Must set property 'jpf.config'</fail>
229 <ant antfile="build.xml" inheritall="false" target="compile"/>
232 <pathelement location="build/tests"/>
233 <path refid="base.path"/>
235 <sourcepath id="sp.tests">
236 <pathelement location="src/tests"/>
237 <path refid="source.path"/>
240 <nbjpdastart addressproperty="jpda.address" name="${jpf.config}" transport="dt_socket">
241 <classpath refid="cp.tests"/>
242 <sourcepath refid="sp.tests"/>
245 <java classname="gov.nasa.jpf.JPF" fork="true">
246 <classpath refid="cp.tests"/>
247 <jvmarg value="-ea"/>
248 <jvmarg value="-Xdebug"/>
249 <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
251 <arg value="${jpf.config}"/>