1 <?xml version="1.0" encoding="UTF-8"?>
3 *** GENERATED FROM project.xml - DO NOT EDIT ***
4 *** EDIT ../build.xml INSTEAD ***
6 For the purpose of easier reading the script
7 is divided into following sections:
17 <project xmlns:ear2="http://www.netbeans.org/ns/j2ee-earproject/2" basedir=".." default="default" name="HibernateDemo1-impl">
18 <import file="ant-deploy.xml"/>
19 <target depends="dist" description="Build whole project." name="default"/>
21 INITIALIZATION SECTION
23 <target name="pre-init">
24 <!-- Empty placeholder for easier customization. -->
25 <!-- You can override this target in the ../build.xml file. -->
27 <target depends="pre-init" name="init-private">
28 <property file="nbproject/private/private.properties"/>
30 <target depends="pre-init,init-private" name="init-userdir">
31 <property location="${netbeans.user}/build.properties" name="user.properties.file"/>
33 <target depends="pre-init,init-private,init-userdir" name="init-user">
34 <property file="${user.properties.file}"/>
36 <target depends="pre-init,init-private,init-userdir,init-user" name="init-project">
37 <property file="nbproject/project.properties"/>
39 <target depends="pre-init,init-private,init-userdir,init-user,init-project" name="do-init">
40 <!-- The two properties below are usually overridden -->
41 <!-- by the active platform. Just a fallback. -->
42 <property name="default.javac.source" value="1.4"/>
43 <property name="default.javac.target" value="1.4"/>
44 <condition property="do.compile.jsps">
45 <istrue value="${compile.jsps}"/>
47 <condition property="do.display.browser">
49 <istrue value="${display.browser}"/>
50 <isset property="client.module.uri"/>
52 <isset property="app.client"/>
56 <available file="${meta.inf}/MANIFEST.MF" property="has.custom.manifest"/>
57 <condition else="" property="j2ee.appclient.mainclass.tool.param" value="-mainclass ${main.class}">
59 <isset property="main.class"/>
61 <equals arg1="${main.class}" arg2="" trim="true"/>
65 <condition else="" property="j2ee.appclient.jvmoptions.param" value="${j2ee.appclient.jvmoptions}">
67 <isset property="j2ee.appclient.jvmoptions"/>
69 <equals arg1="${j2ee.appclient.jvmoptions}" arg2="" trim="true"/>
73 <condition else="" property="application.args.param" value="${application.args}">
75 <isset property="application.args"/>
77 <equals arg1="${application.args}" arg2="" trim="true"/>
81 <condition property="can.debug.appclient">
83 <isset property="netbeans.home"/>
84 <isset property="app.client"/>
88 <target depends="init" name="-init-cos">
89 <condition else="false" property="build.deploy.on.save">
90 <istrue value="${j2ee.deploy.on.save}"/>
93 <target name="post-init">
94 <!-- Empty placeholder for easier customization. -->
95 <!-- You can override this target in the ../build.xml file. -->
97 <target depends="pre-init,init-private,init-userdir,init-user,init-project,do-init" name="init-check">
98 <fail unless="build.dir">Must set build.dir</fail>
99 <fail unless="build.generated.dir">Must set build.generated.dir</fail>
100 <fail unless="dist.dir">Must set dist.dir</fail>
101 <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
102 <fail unless="dist.jar">Must set dist.jar</fail>
104 <target name="-init-taskdefs">
105 <fail unless="libs.CopyLibs.classpath">
106 The libs.CopyLibs.classpath property is not set up.
107 This property must point to
108 org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
109 of NetBeans IDE installation and is usually located at
110 <netbeans_installation>/java<version>/ant/extra folder.
111 Either open the project in the IDE and make sure CopyLibs library
112 exists or setup the property manually. For example like this:
113 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
115 <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
117 <target depends="pre-init,init-private,init-userdir,init-user,init-project,do-init,post-init,init-check,-init-taskdefs" name="init"/>
121 <target depends="init" name="deps-jar" unless="no.deps"/>
122 <target depends="init" name="deps-j2ee-archive" unless="no.deps">
123 <condition property="build.deploy.on.save" value="false">
125 <isset property="build.deploy.on.save"/>
128 <ant antfile="${project.HibernateDemo1-ejb}/build.xml" inheritall="false" target="dist-ear">
129 <property location="${build.dir}" name="dist.ear.dir"/>
130 <property name="deploy.on.save" value="${build.deploy.on.save}"/>
132 <condition property="build.deploy.on.save" value="false">
134 <isset property="build.deploy.on.save"/>
137 <ant antfile="${project.HibernateDemo1-war}/build.xml" inheritall="false" target="dist-ear">
138 <property location="${build.dir}" name="dist.ear.dir"/>
139 <property name="deploy.on.save" value="${build.deploy.on.save}"/>
142 <target depends="init,deps-jar,deps-j2ee-archive" name="pre-pre-compile"/>
143 <target name="pre-compile">
144 <!-- Empty placeholder for easier customization. -->
145 <!-- You can override this target in the ../build.xml file. -->
147 <target depends="init,deps-jar,pre-pre-compile,pre-compile" name="do-compile">
148 <copy todir="${build.dir}/META-INF">
149 <fileset dir="${meta.inf}"/>
151 <copyfiles files="${reference.HibernateDemo1-war.dist-ear}" todir="${build.dir}//"/>
152 <copyfiles files="${reference.HibernateDemo1-ejb.dist-ear}" todir="${build.dir}//"/>
154 <target name="post-compile">
155 <!-- Empty placeholder for easier customization. -->
156 <!-- You can override this target in the ../build.xml file. -->
158 <target depends="init,deps-jar,pre-pre-compile,pre-compile,do-compile,post-compile" description="Compile project." name="compile"/>
160 DIST BUILDING SECTION
162 <target name="pre-dist">
163 <!-- Empty placeholder for easier customization. -->
164 <!-- You can override this target in the ../build.xml file. -->
166 <target depends="init,compile,pre-dist" name="do-dist-without-manifest" unless="has.custom.manifest">
167 <dirname file="${dist.jar}" property="dist.jar.dir"/>
168 <mkdir dir="${dist.jar.dir}"/>
169 <jar compress="${jar.compress}" jarfile="${dist.jar}">
170 <fileset dir="${build.dir}"/>
173 <target depends="init,compile,pre-dist" if="has.custom.manifest" name="do-dist-with-manifest">
174 <dirname file="${dist.jar}" property="dist.jar.dir"/>
175 <mkdir dir="${dist.jar.dir}"/>
176 <jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${meta.inf}/MANIFEST.MF">
177 <fileset dir="${build.dir}"/>
180 <target name="post-dist">
181 <!-- Empty placeholder for easier customization. -->
182 <!-- You can override this target in the ../build.xml file. -->
184 <target depends="init,compile,pre-dist,do-dist-without-manifest,do-dist-with-manifest,post-dist" description="Build distribution (JAR)." name="dist"/>
188 <target depends="run-deploy,run-display-browser,run-ac" description="Deploy to server." name="run"/>
189 <target name="pre-run-deploy">
190 <!-- Empty placeholder for easier customization. -->
191 <!-- You can override this target in the ../build.xml file. -->
193 <target name="post-run-deploy">
194 <!-- Empty placeholder for easier customization. -->
195 <!-- You can override this target in the ../build.xml file. -->
197 <target name="-pre-nbmodule-run-deploy">
198 <!-- Empty placeholder for easier customization. -->
199 <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
201 <target name="-post-nbmodule-run-deploy">
202 <!-- Empty placeholder for easier customization. -->
203 <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
205 <target name="-run-deploy-am" unless="no.deps">
206 <!-- Task to deploy to the Access Manager runtime. -->
207 <ant antfile="${project.HibernateDemo1-ejb}/build.xml" inheritall="false" target="-run-deploy-am"/>
208 <ant antfile="${project.HibernateDemo1-war}/build.xml" inheritall="false" target="-run-deploy-am"/>
210 <target depends="-init-cos,dist,pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,post-run-deploy" name="run-deploy"/>
211 <target if="netbeans.home" name="-run-deploy-nb">
212 <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
214 <target name="-init-deploy-ant" unless="netbeans.home">
215 <property name="deploy.ant.archive" value="${dist.jar}"/>
216 <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
217 <property name="deploy.ant.enabled" value="true"/>
219 <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
220 <target if="netbeans.home" name="-run-undeploy-nb">
221 <fail message="Undeploy is not supported from within the IDE"/>
223 <target depends="dist" name="verify">
224 <nbverify file="${dist.jar}"/>
226 <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
227 <target if="do.display.browser" name="-init-display-browser">
228 <condition property="do.display.browser.nb">
229 <isset property="netbeans.home"/>
231 <condition property="do.display.browser.cl">
233 <isset property="deploy.ant.enabled"/>
234 <isset property="deploy.ant.client.url"/>
238 <target if="do.display.browser.nb" name="-display-browser-nb">
239 <nbbrowse url="${client.url}"/>
241 <target if="do.display.browser.cl" name="-get-browser" unless="browser">
242 <condition property="browser" value="rundll32">
243 <os family="windows"/>
245 <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
246 <os family="windows"/>
248 <condition property="browser" value="/usr/bin/open">
251 <property environment="env"/>
252 <condition property="browser" value="${env.BROWSER}">
253 <isset property="env.BROWSER"/>
255 <condition property="browser" value="/usr/bin/firefox">
256 <available file="/usr/bin/firefox"/>
258 <condition property="browser" value="/usr/local/firefox/firefox">
259 <available file="/usr/local/firefox/firefox"/>
261 <condition property="browser" value="/usr/bin/mozilla">
262 <available file="/usr/bin/mozilla"/>
264 <condition property="browser" value="/usr/local/mozilla/mozilla">
265 <available file="/usr/local/mozilla/mozilla"/>
267 <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
268 <available file="/usr/sfw/lib/firefox/firefox"/>
270 <condition property="browser" value="/opt/csw/bin/firefox">
271 <available file="/opt/csw/bin/firefox"/>
273 <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
274 <available file="/usr/sfw/lib/mozilla/mozilla"/>
276 <condition property="browser" value="/opt/csw/bin/mozilla">
277 <available file="/opt/csw/bin/mozilla"/>
280 <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
281 <fail unless="browser">
282 Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
284 <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
285 <echo>Launching ${browse.url}</echo>
286 <exec executable="${browser}" spawn="true">
287 <arg line="${browser.args} ${browse.url}"/>
290 <target depends="init" if="app.client" name="run-ac">
291 <antcall target="run-${app.client}"/>
293 <target if="j2ee.appclient.mainclass.args" name="-as-retrieve-option-workaround" unless="j2ee.clientName">
294 <property name="client.jar" value="${dist.dir}/HibernateDemo1Client.jar"/>
296 <copy file="${wa.copy.client.jar.from}/HibernateDemo1/HibernateDemo1Client.jar" todir="${dist.dir}"/>
301 <target depends="run-debug,run-debug-appclient" description="Deploy to server." name="debug"/>
302 <target depends="dist" description="Debug project in IDE." if="netbeans.home" name="run-debug" unless="app.client">
303 <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="true"/>
304 <antcall target="connect-debugger"/>
305 <antcall target="debug-display-browser"/>
307 <target name="connect-debugger" unless="is.debugged">
308 <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
310 <path path="${debug.classpath}"/>
313 <path path="${ear.docbase.dirs}"/>
317 <target if="do.display.browser" name="debug-display-browser">
318 <nbbrowse url="${client.url}"/>
320 <target name="-init-debug-args">
321 <property name="version-output" value="java version "${ant.java.version}"/>
322 <condition property="have-jdk-older-than-1.4">
324 <contains string="${version-output}" substring="java version "1.0"/>
325 <contains string="${version-output}" substring="java version "1.1"/>
326 <contains string="${version-output}" substring="java version "1.2"/>
327 <contains string="${version-output}" substring="java version "1.3"/>
330 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
331 <istrue value="${have-jdk-older-than-1.4}"/>
334 <target depends="init,-init-debug-args" if="can.debug.appclient" name="run-debug-appclient">
335 <macrodef name="debug-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
336 <attribute name="mainclass"/>
337 <attribute default="${debug.classpath}" name="classpath"/>
338 <element name="customize" optional="true"/>
339 <attribute default="${application.args.param}" name="args"/>
342 <java classname="@{mainclass}" fork="true">
343 <jvmarg line="${j2ee.appclient.tool.jvmoptions}"/>
344 <jvmarg line="${debug-args-line}"/>
345 <jvmarg value="-Xrunjdwp:transport=${jpda.transport},server=y,address=${jpda.address},suspend=y"/>
346 <jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
347 <arg line="@{args}"/>
349 <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
350 <path path="@{classpath}"/>
353 <propertyref prefix="run-sys-prop."/>
354 <mapper from="run-sys-prop.*" to="*" type="glob"/>
358 <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
360 <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
361 <path path="@{classpath}"/>
364 <path path="${src.dir}"/>
370 <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="false"/>
371 <antcall target="debug-${app.client}"/>
376 <target depends="init" name="deps-clean" unless="no.deps">
377 <condition property="build.deploy.on.save" value="false">
379 <isset property="build.deploy.on.save"/>
382 <ant antfile="${project.HibernateDemo1-ejb}/build.xml" inheritall="false" target="clean-ear">
383 <property location="${build.dir}" name="dist.ear.dir"/>
384 <property name="deploy.on.save" value="${build.deploy.on.save}"/>
386 <condition property="build.deploy.on.save" value="false">
388 <isset property="build.deploy.on.save"/>
391 <ant antfile="${project.HibernateDemo1-war}/build.xml" inheritall="false" target="clean-ear">
392 <property location="${build.dir}" name="dist.ear.dir"/>
393 <property name="deploy.on.save" value="${build.deploy.on.save}"/>
396 <target depends="init" name="do-clean">
397 <delete dir="${build.dir}"/>
398 <delete dir="${dist.dir}"/>
399 <delete dir="${build.dir}"/>
401 <target depends="init" if="netbeans.home" name="undeploy-clean">
402 <nbundeploy failOnError="false" startServer="false"/>
404 <target name="post-clean">
405 <!-- Empty placeholder for easier customization. -->
406 <!-- You can override this target in the ../build.xml file. -->
408 <target depends="init,undeploy-clean,deps-clean,do-clean,post-clean" description="Clean build products." name="clean"/>