java/HibernateDemo1/nbproject/build-impl.xml
author František Kučera <franta-hg@frantovo.cz>
Sat, 14 Mar 2009 23:55:35 +0100
changeset 5 cd25a845d256
parent 0 16a1fc2116d6
permissions -rw-r--r--
Vypnutí logování SQL příkazů
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <!--
     3 *** GENERATED FROM project.xml - DO NOT EDIT  ***
     4 ***         EDIT ../build.xml INSTEAD         ***
     5 
     6 For the purpose of easier reading the script
     7 is divided into following sections:
     8 
     9   - initialization
    10   - compilation
    11   - dist
    12   - execution
    13   - debugging
    14   - cleanup
    15 
    16 -->
    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"/>
    20     <!-- 
    21     INITIALIZATION SECTION 
    22     -->
    23     <target name="pre-init">
    24         <!-- Empty placeholder for easier customization. -->
    25         <!-- You can override this target in the ../build.xml file. -->
    26     </target>
    27     <target depends="pre-init" name="init-private">
    28         <property file="nbproject/private/private.properties"/>
    29     </target>
    30     <target depends="pre-init,init-private" name="init-userdir">
    31         <property location="${netbeans.user}/build.properties" name="user.properties.file"/>
    32     </target>
    33     <target depends="pre-init,init-private,init-userdir" name="init-user">
    34         <property file="${user.properties.file}"/>
    35     </target>
    36     <target depends="pre-init,init-private,init-userdir,init-user" name="init-project">
    37         <property file="nbproject/project.properties"/>
    38     </target>
    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}"/>
    46         </condition>
    47         <condition property="do.display.browser">
    48             <and>
    49                 <istrue value="${display.browser}"/>
    50                 <isset property="client.module.uri"/>
    51                 <not>
    52                     <isset property="app.client"/>
    53                 </not>
    54             </and>
    55         </condition>
    56         <available file="${meta.inf}/MANIFEST.MF" property="has.custom.manifest"/>
    57         <condition else="" property="j2ee.appclient.mainclass.tool.param" value="-mainclass ${main.class}">
    58             <and>
    59                 <isset property="main.class"/>
    60                 <not>
    61                     <equals arg1="${main.class}" arg2="" trim="true"/>
    62                 </not>
    63             </and>
    64         </condition>
    65         <condition else="" property="j2ee.appclient.jvmoptions.param" value="${j2ee.appclient.jvmoptions}">
    66             <and>
    67                 <isset property="j2ee.appclient.jvmoptions"/>
    68                 <not>
    69                     <equals arg1="${j2ee.appclient.jvmoptions}" arg2="" trim="true"/>
    70                 </not>
    71             </and>
    72         </condition>
    73         <condition else="" property="application.args.param" value="${application.args}">
    74             <and>
    75                 <isset property="application.args"/>
    76                 <not>
    77                     <equals arg1="${application.args}" arg2="" trim="true"/>
    78                 </not>
    79             </and>
    80         </condition>
    81         <condition property="can.debug.appclient">
    82             <and>
    83                 <isset property="netbeans.home"/>
    84                 <isset property="app.client"/>
    85             </and>
    86         </condition>
    87     </target>
    88     <target depends="init" name="-init-cos">
    89         <condition else="false" property="build.deploy.on.save">
    90             <istrue value="${j2ee.deploy.on.save}"/>
    91         </condition>
    92     </target>
    93     <target name="post-init">
    94         <!-- Empty placeholder for easier customization. -->
    95         <!-- You can override this target in the ../build.xml file. -->
    96     </target>
    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>
   103     </target>
   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 &lt;netbeans_installation&gt;/java&lt;version&gt;/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
   114                 </fail>
   115         <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
   116     </target>
   117     <target depends="pre-init,init-private,init-userdir,init-user,init-project,do-init,post-init,init-check,-init-taskdefs" name="init"/>
   118     <!--
   119     COMPILATION SECTION
   120     -->
   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">
   124             <not>
   125                 <isset property="build.deploy.on.save"/>
   126             </not>
   127         </condition>
   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}"/>
   131         </ant>
   132         <condition property="build.deploy.on.save" value="false">
   133             <not>
   134                 <isset property="build.deploy.on.save"/>
   135             </not>
   136         </condition>
   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}"/>
   140         </ant>
   141     </target>
   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. -->
   146     </target>
   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}"/>
   150         </copy>
   151         <copyfiles files="${reference.HibernateDemo1-war.dist-ear}" todir="${build.dir}//"/>
   152         <copyfiles files="${reference.HibernateDemo1-ejb.dist-ear}" todir="${build.dir}//"/>
   153     </target>
   154     <target name="post-compile">
   155         <!-- Empty placeholder for easier customization. -->
   156         <!-- You can override this target in the ../build.xml file. -->
   157     </target>
   158     <target depends="init,deps-jar,pre-pre-compile,pre-compile,do-compile,post-compile" description="Compile project." name="compile"/>
   159     <!--
   160     DIST BUILDING SECTION
   161     -->
   162     <target name="pre-dist">
   163         <!-- Empty placeholder for easier customization. -->
   164         <!-- You can override this target in the ../build.xml file. -->
   165     </target>
   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}"/>
   171         </jar>
   172     </target>
   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}"/>
   178         </jar>
   179     </target>
   180     <target name="post-dist">
   181         <!-- Empty placeholder for easier customization. -->
   182         <!-- You can override this target in the ../build.xml file. -->
   183     </target>
   184     <target depends="init,compile,pre-dist,do-dist-without-manifest,do-dist-with-manifest,post-dist" description="Build distribution (JAR)." name="dist"/>
   185     <!--
   186     EXECUTION SECTION
   187     -->
   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. -->
   192     </target>
   193     <target name="post-run-deploy">
   194         <!-- Empty placeholder for easier customization. -->
   195         <!-- You can override this target in the ../build.xml file. -->
   196     </target>
   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. -->
   200     </target>
   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. -->
   204     </target>
   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"/>
   209     </target>
   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}"/>
   213     </target>
   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"/>
   218     </target>
   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"/>
   222     </target>
   223     <target depends="dist" name="verify">
   224         <nbverify file="${dist.jar}"/>
   225     </target>
   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"/>
   230         </condition>
   231         <condition property="do.display.browser.cl">
   232             <and>
   233                 <isset property="deploy.ant.enabled"/>
   234                 <isset property="deploy.ant.client.url"/>
   235             </and>
   236         </condition>
   237     </target>
   238     <target if="do.display.browser.nb" name="-display-browser-nb">
   239         <nbbrowse url="${client.url}"/>
   240     </target>
   241     <target if="do.display.browser.cl" name="-get-browser" unless="browser">
   242         <condition property="browser" value="rundll32">
   243             <os family="windows"/>
   244         </condition>
   245         <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
   246             <os family="windows"/>
   247         </condition>
   248         <condition property="browser" value="/usr/bin/open">
   249             <os family="mac"/>
   250         </condition>
   251         <property environment="env"/>
   252         <condition property="browser" value="${env.BROWSER}">
   253             <isset property="env.BROWSER"/>
   254         </condition>
   255         <condition property="browser" value="/usr/bin/firefox">
   256             <available file="/usr/bin/firefox"/>
   257         </condition>
   258         <condition property="browser" value="/usr/local/firefox/firefox">
   259             <available file="/usr/local/firefox/firefox"/>
   260         </condition>
   261         <condition property="browser" value="/usr/bin/mozilla">
   262             <available file="/usr/bin/mozilla"/>
   263         </condition>
   264         <condition property="browser" value="/usr/local/mozilla/mozilla">
   265             <available file="/usr/local/mozilla/mozilla"/>
   266         </condition>
   267         <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
   268             <available file="/usr/sfw/lib/firefox/firefox"/>
   269         </condition>
   270         <condition property="browser" value="/opt/csw/bin/firefox">
   271             <available file="/opt/csw/bin/firefox"/>
   272         </condition>
   273         <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
   274             <available file="/usr/sfw/lib/mozilla/mozilla"/>
   275         </condition>
   276         <condition property="browser" value="/opt/csw/bin/mozilla">
   277             <available file="/opt/csw/bin/mozilla"/>
   278         </condition>
   279     </target>
   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.
   283         </fail>
   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}"/>
   288         </exec>
   289     </target>
   290     <target depends="init" if="app.client" name="run-ac">
   291         <antcall target="run-${app.client}"/>
   292     </target>
   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"/>
   295         <sleep seconds="3"/>
   296         <copy file="${wa.copy.client.jar.from}/HibernateDemo1/HibernateDemo1Client.jar" todir="${dist.dir}"/>
   297     </target>
   298     <!--
   299     DEBUGGING SECTION
   300     -->
   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"/>
   306     </target>
   307     <target name="connect-debugger" unless="is.debugged">
   308         <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
   309             <classpath>
   310                 <path path="${debug.classpath}"/>
   311             </classpath>
   312             <sourcepath>
   313                 <path path="${ear.docbase.dirs}"/>
   314             </sourcepath>
   315         </nbjpdaconnect>
   316     </target>
   317     <target if="do.display.browser" name="debug-display-browser">
   318         <nbbrowse url="${client.url}"/>
   319     </target>
   320     <target name="-init-debug-args">
   321         <property name="version-output" value="java version &quot;${ant.java.version}"/>
   322         <condition property="have-jdk-older-than-1.4">
   323             <or>
   324                 <contains string="${version-output}" substring="java version &quot;1.0"/>
   325                 <contains string="${version-output}" substring="java version &quot;1.1"/>
   326                 <contains string="${version-output}" substring="java version &quot;1.2"/>
   327                 <contains string="${version-output}" substring="java version &quot;1.3"/>
   328             </or>
   329         </condition>
   330         <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
   331             <istrue value="${have-jdk-older-than-1.4}"/>
   332         </condition>
   333     </target>
   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"/>
   340             <sequential>
   341                 <parallel>
   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}"/>
   348                         <classpath>
   349                             <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
   350                             <path path="@{classpath}"/>
   351                         </classpath>
   352                         <syspropertyset>
   353                             <propertyref prefix="run-sys-prop."/>
   354                             <mapper from="run-sys-prop.*" to="*" type="glob"/>
   355                         </syspropertyset>
   356                         <customize/>
   357                     </java>
   358                     <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
   359                         <classpath>
   360                             <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
   361                             <path path="@{classpath}"/>
   362                         </classpath>
   363                         <sourcepath>
   364                             <path path="${src.dir}"/>
   365                         </sourcepath>
   366                     </nbjpdaconnect>
   367                 </parallel>
   368             </sequential>
   369         </macrodef>
   370         <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="false"/>
   371         <antcall target="debug-${app.client}"/>
   372     </target>
   373     <!--
   374     CLEANUP SECTION
   375     -->
   376     <target depends="init" name="deps-clean" unless="no.deps">
   377         <condition property="build.deploy.on.save" value="false">
   378             <not>
   379                 <isset property="build.deploy.on.save"/>
   380             </not>
   381         </condition>
   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}"/>
   385         </ant>
   386         <condition property="build.deploy.on.save" value="false">
   387             <not>
   388                 <isset property="build.deploy.on.save"/>
   389             </not>
   390         </condition>
   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}"/>
   394         </ant>
   395     </target>
   396     <target depends="init" name="do-clean">
   397         <delete dir="${build.dir}"/>
   398         <delete dir="${dist.dir}"/>
   399         <delete dir="${build.dir}"/>
   400     </target>
   401     <target depends="init" if="netbeans.home" name="undeploy-clean">
   402         <nbundeploy failOnError="false" startServer="false"/>
   403     </target>
   404     <target name="post-clean">
   405         <!-- Empty placeholder for easier customization. -->
   406         <!-- You can override this target in the ../build.xml file. -->
   407     </target>
   408     <target depends="init,undeploy-clean,deps-clean,do-clean,post-clean" description="Clean build products." name="clean"/>
   409 </project>