java/nekurak.net-ear/nbproject/build-impl.xml
author František Kučera <franta-hg@frantovo.cz>
Thu Feb 11 10:06:39 2010 +0100 (2010-02-11)
changeset 28 0f037986bb6b
child 75 18ed62105526
permissions -rw-r--r--
Hibernate.
     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="nekurak.net-ear-impl">
    18     <import file="ant-deploy.xml"/>
    19     <fail message="Please build using Ant 1.7.1 or higher.">
    20         <condition>
    21             <not>
    22                 <antversion atleast="1.7.1"/>
    23             </not>
    24         </condition>
    25     </fail>
    26     <target depends="dist" description="Build whole project." name="default"/>
    27     <!-- 
    28     INITIALIZATION SECTION 
    29     -->
    30     <target name="pre-init">
    31         <!-- Empty placeholder for easier customization. -->
    32         <!-- You can override this target in the ../build.xml file. -->
    33     </target>
    34     <target depends="pre-init" name="init-private">
    35         <property file="nbproject/private/private.properties"/>
    36     </target>
    37     <target depends="pre-init,init-private" name="init-userdir">
    38         <property location="${netbeans.user}/build.properties" name="user.properties.file"/>
    39     </target>
    40     <target depends="pre-init,init-private,init-userdir" name="init-user">
    41         <property file="${user.properties.file}"/>
    42     </target>
    43     <target depends="pre-init,init-private,init-userdir,init-user" name="init-project">
    44         <property file="nbproject/project.properties"/>
    45     </target>
    46     <target depends="pre-init,init-private,init-userdir,init-user,init-project" name="do-init">
    47         <!-- The two properties below are usually overridden -->
    48         <!-- by the active platform. Just a fallback. -->
    49         <property name="default.javac.source" value="1.4"/>
    50         <property name="default.javac.target" value="1.4"/>
    51         <condition property="do.compile.jsps">
    52             <istrue value="${compile.jsps}"/>
    53         </condition>
    54         <condition property="do.display.browser">
    55             <and>
    56                 <istrue value="${display.browser}"/>
    57                 <isset property="client.module.uri"/>
    58                 <not>
    59                     <isset property="app.client"/>
    60                 </not>
    61             </and>
    62         </condition>
    63         <available file="${meta.inf}/MANIFEST.MF" property="has.custom.manifest"/>
    64         <!--
    65                     Variables needed to support directory deployment.
    66                 -->
    67         <condition property="do.package.with.custom.manifest.not.directory.deploy">
    68             <and>
    69                 <isset property="has.custom.manifest"/>
    70                 <isfalse value="${directory.deployment.supported}"/>
    71             </and>
    72         </condition>
    73         <condition property="do.package.without.custom.manifest.not.directory.deploy">
    74             <and>
    75                 <not>
    76                     <isset property="has.custom.manifest"/>
    77                 </not>
    78                 <isfalse value="${directory.deployment.supported}"/>
    79             </and>
    80         </condition>
    81         <condition property="do.package.not.directory.deploy">
    82             <isfalse value="${directory.deployment.supported}"/>
    83         </condition>
    84         <!--End Variables needed to support directory deployment.-->
    85         <condition else="" property="j2ee.appclient.mainclass.tool.param" value="-mainclass ${main.class}">
    86             <and>
    87                 <isset property="main.class"/>
    88                 <not>
    89                     <equals arg1="${main.class}" arg2="" trim="true"/>
    90                 </not>
    91             </and>
    92         </condition>
    93         <condition else="" property="j2ee.appclient.jvmoptions.param" value="${j2ee.appclient.jvmoptions}">
    94             <and>
    95                 <isset property="j2ee.appclient.jvmoptions"/>
    96                 <not>
    97                     <equals arg1="${j2ee.appclient.jvmoptions}" arg2="" trim="true"/>
    98                 </not>
    99             </and>
   100         </condition>
   101         <condition else="" property="application.args.param" value="${application.args}">
   102             <and>
   103                 <isset property="application.args"/>
   104                 <not>
   105                     <equals arg1="${application.args}" arg2="" trim="true"/>
   106                 </not>
   107             </and>
   108         </condition>
   109         <condition property="can.debug.appclient">
   110             <and>
   111                 <isset property="netbeans.home"/>
   112                 <isset property="app.client"/>
   113             </and>
   114         </condition>
   115         <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
   116         <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
   117             <length length="0" string="${endorsed.classpath}" when="greater"/>
   118         </condition>
   119     </target>
   120     <target depends="init" name="-init-cos">
   121         <condition else="false" property="build.deploy.on.save">
   122             <istrue value="${j2ee.deploy.on.save}"/>
   123         </condition>
   124     </target>
   125     <target name="post-init">
   126         <!-- Empty placeholder for easier customization. -->
   127         <!-- You can override this target in the ../build.xml file. -->
   128     </target>
   129     <target depends="pre-init,init-private,init-userdir,init-user,init-project,do-init" name="init-check">
   130         <fail unless="build.dir">Must set build.dir</fail>
   131         <fail unless="build.generated.dir">Must set build.generated.dir</fail>
   132         <fail unless="dist.dir">Must set dist.dir</fail>
   133         <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
   134         <fail unless="dist.jar">Must set dist.jar</fail>
   135     </target>
   136     <target name="-init-taskdefs">
   137         <fail unless="libs.CopyLibs.classpath">
   138 The libs.CopyLibs.classpath property is not set up.
   139 This property must point to 
   140 org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
   141 of NetBeans IDE installation and is usually located at 
   142 &lt;netbeans_installation&gt;/java&lt;version&gt;/ant/extra folder.
   143 Either open the project in the IDE and make sure CopyLibs library
   144 exists or setup the property manually. For example like this:
   145  ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
   146                 </fail>
   147         <taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
   148     </target>
   149     <target depends="pre-init,init-private,init-userdir,init-user,init-project,do-init,post-init,init-check,-init-taskdefs" name="init"/>
   150     <!--
   151     COMPILATION SECTION
   152     -->
   153     <target depends="init" name="deps-jar" unless="no.deps"/>
   154     <target depends="init" name="deps-j2ee-archive" unless="no.deps">
   155         <condition property="build.deploy.on.save" value="false">
   156             <not>
   157                 <isset property="build.deploy.on.save"/>
   158             </not>
   159         </condition>
   160         <ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="dist-ear">
   161             <property location="${build.dir}" name="dist.ear.dir"/>
   162             <property name="deploy.on.save" value="${build.deploy.on.save}"/>
   163         </ant>
   164         <condition property="build.deploy.on.save" value="false">
   165             <not>
   166                 <isset property="build.deploy.on.save"/>
   167             </not>
   168         </condition>
   169         <ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="dist-ear">
   170             <property location="${build.dir}" name="dist.ear.dir"/>
   171             <property name="deploy.on.save" value="${build.deploy.on.save}"/>
   172         </ant>
   173     </target>
   174     <target depends="init,deps-jar,deps-j2ee-archive" name="pre-pre-compile"/>
   175     <target name="pre-compile">
   176         <!-- Empty placeholder for easier customization. -->
   177         <!-- You can override this target in the ../build.xml file. -->
   178     </target>
   179     <target depends="init,deps-jar,pre-pre-compile,pre-compile,-do-compile-deps" name="do-compile">
   180         <copy todir="${build.dir}/META-INF">
   181             <fileset dir="${meta.inf}"/>
   182         </copy>
   183     </target>
   184     <target depends="init,deps-jar,pre-pre-compile,pre-compile" name="-do-compile-deps">
   185         <copyfiles files="${reference.nekurak_net-web.dist-ear}" todir="${build.dir}//"/>
   186         <copyfiles files="${reference.nekurak_net-ejb.dist-ear}" todir="${build.dir}//"/>
   187     </target>
   188     <target name="post-compile">
   189         <!-- Empty placeholder for easier customization. -->
   190         <!-- You can override this target in the ../build.xml file. -->
   191     </target>
   192     <target depends="init,deps-jar,pre-pre-compile,pre-compile,do-compile,post-compile" description="Compile project." name="compile"/>
   193     <!--
   194                 DIST BUILDING SECTION
   195             -->
   196     <target name="pre-dist">
   197         <!-- Empty placeholder for easier customization. -->
   198         <!-- You can override this target in the ../build.xml file. -->
   199     </target>
   200     <target depends="init,compile,pre-dist" name="do-dist-without-manifest" unless="has.custom.manifest">
   201         <dirname file="${dist.jar}" property="dist.jar.dir"/>
   202         <mkdir dir="${dist.jar.dir}"/>
   203         <jar compress="${jar.compress}" jarfile="${dist.jar}">
   204             <fileset dir="${build.dir}"/>
   205         </jar>
   206     </target>
   207     <target depends="init,compile,pre-dist" if="has.custom.manifest" name="do-dist-with-manifest">
   208         <dirname file="${dist.jar}" property="dist.jar.dir"/>
   209         <mkdir dir="${dist.jar.dir}"/>
   210         <jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${meta.inf}/MANIFEST.MF">
   211             <fileset dir="${build.dir}"/>
   212         </jar>
   213     </target>
   214     <!--
   215                 TARGETS NEEDED TO SUPPORT DIRECTORY DEPLOYMENT
   216             -->
   217     <target depends="init,compile,pre-dist" if="do.package.without.custom.manifest.not.directory.deploy" name="-do-tmp-dist-without-manifest">
   218         <dirname file="${dist.jar}" property="dist.jar.dir"/>
   219         <mkdir dir="${dist.jar.dir}"/>
   220         <jar compress="${jar.compress}" jarfile="${dist.jar}">
   221             <fileset dir="${build.dir}"/>
   222         </jar>
   223     </target>
   224     <target depends="init,compile,pre-dist" if="do.package.with.custom.manifest.not.directory.deploy" name="-do-tmp-dist-with-manifest">
   225         <dirname file="${dist.jar}" property="dist.jar.dir"/>
   226         <mkdir dir="${dist.jar.dir}"/>
   227         <jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${meta.inf}/MANIFEST.MF">
   228             <fileset dir="${build.dir}"/>
   229         </jar>
   230     </target>
   231     <target depends="init,compile,pre-dist,-do-tmp-dist-without-manifest,-do-tmp-dist-with-manifest" name="-do-dist-directory-deploy"/>
   232     <target depends="init,compile,pre-dist,-do-dist-directory-deploy,post-dist" description="Build distribution (JAR) - if directory deployment is not supported." name="dist-directory-deploy"/>
   233     <!--
   234                 END TARGETS NEEDED TO SUPPORT DIRECTORY DEPLOYMENT
   235             -->
   236     <target name="post-dist">
   237         <!-- Empty placeholder for easier customization. -->
   238         <!-- You can override this target in the ../build.xml file. -->
   239     </target>
   240     <target depends="init,compile,pre-dist,do-dist-without-manifest,do-dist-with-manifest,post-dist" description="Build distribution (JAR)." name="dist"/>
   241     <!--
   242     EXECUTION SECTION
   243     -->
   244     <target depends="run-deploy,run-display-browser,run-ac" description="Deploy to server." name="run"/>
   245     <target name="pre-run-deploy">
   246         <!-- Empty placeholder for easier customization. -->
   247         <!-- You can override this target in the ../build.xml file. -->
   248     </target>
   249     <target name="post-run-deploy">
   250         <!-- Empty placeholder for easier customization. -->
   251         <!-- You can override this target in the ../build.xml file. -->
   252     </target>
   253     <target name="-pre-nbmodule-run-deploy">
   254         <!-- Empty placeholder for easier customization. -->
   255         <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
   256     </target>
   257     <target name="-post-nbmodule-run-deploy">
   258         <!-- Empty placeholder for easier customization. -->
   259         <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
   260     </target>
   261     <target name="-run-deploy-am" unless="no.deps">
   262         <!-- Task to deploy to the Access Manager runtime. -->
   263         <ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="-run-deploy-am"/>
   264         <ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="-run-deploy-am"/>
   265     </target>
   266     <target depends="-init-cos,dist-directory-deploy,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"/>
   267     <target if="netbeans.home" name="-run-deploy-nb">
   268         <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
   269     </target>
   270     <target name="-init-deploy-ant" unless="netbeans.home">
   271         <property name="deploy.ant.archive" value="${dist.jar}"/>
   272         <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
   273         <property name="deploy.ant.enabled" value="true"/>
   274     </target>
   275     <target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
   276     <target if="netbeans.home" name="-run-undeploy-nb">
   277         <fail message="Undeploy is not supported from within the IDE"/>
   278     </target>
   279     <target depends="dist" name="verify">
   280         <nbverify file="${dist.jar}"/>
   281     </target>
   282     <target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
   283     <target if="do.display.browser" name="-init-display-browser">
   284         <condition property="do.display.browser.nb">
   285             <isset property="netbeans.home"/>
   286         </condition>
   287         <condition property="do.display.browser.cl">
   288             <and>
   289                 <isset property="deploy.ant.enabled"/>
   290                 <isset property="deploy.ant.client.url"/>
   291             </and>
   292         </condition>
   293     </target>
   294     <target if="do.display.browser.nb" name="-display-browser-nb">
   295         <nbbrowse url="${client.url}"/>
   296     </target>
   297     <target if="do.display.browser.cl" name="-get-browser" unless="browser">
   298         <condition property="browser" value="rundll32">
   299             <os family="windows"/>
   300         </condition>
   301         <condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
   302             <os family="windows"/>
   303         </condition>
   304         <condition property="browser" value="/usr/bin/open">
   305             <os family="mac"/>
   306         </condition>
   307         <property environment="env"/>
   308         <condition property="browser" value="${env.BROWSER}">
   309             <isset property="env.BROWSER"/>
   310         </condition>
   311         <condition property="browser" value="/usr/bin/firefox">
   312             <available file="/usr/bin/firefox"/>
   313         </condition>
   314         <condition property="browser" value="/usr/local/firefox/firefox">
   315             <available file="/usr/local/firefox/firefox"/>
   316         </condition>
   317         <condition property="browser" value="/usr/bin/mozilla">
   318             <available file="/usr/bin/mozilla"/>
   319         </condition>
   320         <condition property="browser" value="/usr/local/mozilla/mozilla">
   321             <available file="/usr/local/mozilla/mozilla"/>
   322         </condition>
   323         <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
   324             <available file="/usr/sfw/lib/firefox/firefox"/>
   325         </condition>
   326         <condition property="browser" value="/opt/csw/bin/firefox">
   327             <available file="/opt/csw/bin/firefox"/>
   328         </condition>
   329         <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
   330             <available file="/usr/sfw/lib/mozilla/mozilla"/>
   331         </condition>
   332         <condition property="browser" value="/opt/csw/bin/mozilla">
   333             <available file="/opt/csw/bin/mozilla"/>
   334         </condition>
   335     </target>
   336     <target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
   337         <fail unless="browser">
   338             Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
   339         </fail>
   340         <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
   341         <echo>Launching ${browse.url}</echo>
   342         <exec executable="${browser}" spawn="true">
   343             <arg line="${browser.args} ${browse.url}"/>
   344         </exec>
   345     </target>
   346     <target depends="init" if="app.client" name="run-ac">
   347         <antcall target="run-${app.client}"/>
   348     </target>
   349     <target if="j2ee.appclient.mainclass.args" name="-as-retrieve-option-workaround" unless="j2ee.clientName">
   350         <property name="client.jar" value="${dist.dir}/nekurak.net-earClient.jar"/>
   351         <sleep seconds="3"/>
   352         <copy failonerror="false" file="${wa.copy.client.jar.from}/nekurak.net-ear/nekurak.net-earClient.jar" todir="${dist.dir}"/>
   353         <copy failonerror="false" flatten="true" todir="${dist.dir}/">
   354             <fileset dir="${wa.copy.client.jar.from}/nekurak.net-ear" includes="**/nekurak.net-earClient.jar"/>
   355         </copy>
   356         <copy flatten="true" todir="${dist.dir}/nekurak.net-earClient">
   357             <fileset dir="${wa.copy.client.jar.from}/nekurak.net-ear" includes="**/*.*ar"/>
   358         </copy>
   359         <copy failonerror="false" flatten="false" todir="${dist.dir}/nekurak.net-earClient">
   360             <fileset dir="${dist.dir}/gfdeploy/nekurak.net-ear" includes="**/*.jar"/>
   361         </copy>
   362     </target>
   363     <!--
   364     DEBUGGING SECTION
   365     -->
   366     <target depends="run-debug,run-debug-appclient" description="Deploy to server." name="debug"/>
   367     <target depends="dist" description="Debug project in IDE." if="netbeans.home" name="run-debug" unless="app.client">
   368         <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="true"/>
   369         <antcall target="connect-debugger"/>
   370         <antcall target="debug-display-browser"/>
   371     </target>
   372     <target name="connect-debugger" unless="is.debugged">
   373         <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
   374             <classpath>
   375                 <path path="${debug.classpath}"/>
   376                 <fileset dir="${build.dir}/lib" includes="*.jar"/>
   377             </classpath>
   378             <sourcepath>
   379                 <path path="${ear.docbase.dirs}"/>
   380             </sourcepath>
   381         </nbjpdaconnect>
   382     </target>
   383     <target if="do.display.browser" name="debug-display-browser">
   384         <nbbrowse url="${client.url}"/>
   385     </target>
   386     <target name="-init-debug-args">
   387         <property name="version-output" value="java version &quot;${ant.java.version}"/>
   388         <condition property="have-jdk-older-than-1.4">
   389             <or>
   390                 <contains string="${version-output}" substring="java version &quot;1.0"/>
   391                 <contains string="${version-output}" substring="java version &quot;1.1"/>
   392                 <contains string="${version-output}" substring="java version &quot;1.2"/>
   393                 <contains string="${version-output}" substring="java version &quot;1.3"/>
   394             </or>
   395         </condition>
   396         <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
   397             <istrue value="${have-jdk-older-than-1.4}"/>
   398         </condition>
   399     </target>
   400     <target depends="init,-init-debug-args" if="can.debug.appclient" name="run-debug-appclient">
   401         <macrodef name="debug-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
   402             <attribute name="mainclass"/>
   403             <attribute default="${debug.classpath}" name="classpath"/>
   404             <element name="customize" optional="true"/>
   405             <attribute default="${application.args.param}" name="args"/>
   406             <sequential>
   407                 <parallel>
   408                     <java classname="@{mainclass}" fork="true">
   409                         <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
   410                         <jvmarg line="${j2ee.appclient.tool.jvmoptions}"/>
   411                         <jvmarg line="${debug-args-line}"/>
   412                         <jvmarg value="-Xrunjdwp:transport=${jpda.transport},server=y,address=${jpda.address},suspend=y"/>
   413                         <jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
   414                         <arg line="@{args}"/>
   415                         <classpath>
   416                             <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
   417                             <path path="@{classpath}"/>
   418                         </classpath>
   419                         <syspropertyset>
   420                             <propertyref prefix="run-sys-prop."/>
   421                             <mapper from="run-sys-prop.*" to="*" type="glob"/>
   422                         </syspropertyset>
   423                         <customize/>
   424                     </java>
   425                     <nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${name}" transport="${jpda.transport}">
   426                         <classpath>
   427                             <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
   428                             <path path="@{classpath}"/>
   429                         </classpath>
   430                         <sourcepath>
   431                             <path path="${src.dir}"/>
   432                         </sourcepath>
   433                     </nbjpdaconnect>
   434                 </parallel>
   435             </sequential>
   436         </macrodef>
   437         <nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="false"/>
   438         <antcall target="debug-${app.client}"/>
   439     </target>
   440     <!--
   441     CLEANUP SECTION
   442     -->
   443     <target depends="init" name="deps-clean" unless="no.deps">
   444         <condition property="build.deploy.on.save" value="false">
   445             <not>
   446                 <isset property="build.deploy.on.save"/>
   447             </not>
   448         </condition>
   449         <ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="clean-ear">
   450             <property location="${build.dir}" name="dist.ear.dir"/>
   451             <property name="deploy.on.save" value="${build.deploy.on.save}"/>
   452         </ant>
   453         <condition property="build.deploy.on.save" value="false">
   454             <not>
   455                 <isset property="build.deploy.on.save"/>
   456             </not>
   457         </condition>
   458         <ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="clean-ear">
   459             <property location="${build.dir}" name="dist.ear.dir"/>
   460             <property name="deploy.on.save" value="${build.deploy.on.save}"/>
   461         </ant>
   462     </target>
   463     <target depends="init" name="do-clean">
   464         <delete dir="${build.dir}"/>
   465         <delete dir="${dist.dir}"/>
   466         <delete dir="${build.dir}"/>
   467     </target>
   468     <target depends="init" if="netbeans.home" name="undeploy-clean">
   469         <nbundeploy failOnError="false" startServer="false"/>
   470     </target>
   471     <target name="post-clean">
   472         <!-- Empty placeholder for easier customization. -->
   473         <!-- You can override this target in the ../build.xml file. -->
   474     </target>
   475     <target depends="init,undeploy-clean,deps-clean,do-clean,post-clean" description="Clean build products." name="clean"/>
   476 </project>