java/nekurak.net-ear/nbproject/build-impl.xml
author František Kučera <franta-hg@frantovo.cz>
Tue, 19 Jul 2011 15:48:41 +0200
changeset 189 fcd69520f12d
parent 188 74d06a8a4948
permissions -rw-r--r--
Odhlašování – logování.
franta-hg@27
     1
<?xml version="1.0" encoding="UTF-8"?>
franta-hg@27
     2
<!--
franta-hg@27
     3
*** GENERATED FROM project.xml - DO NOT EDIT  ***
franta-hg@27
     4
***         EDIT ../build.xml INSTEAD         ***
franta-hg@27
     5
franta-hg@27
     6
For the purpose of easier reading the script
franta-hg@27
     7
is divided into following sections:
franta-hg@27
     8
franta-hg@27
     9
  - initialization
franta-hg@27
    10
  - compilation
franta-hg@27
    11
  - dist
franta-hg@27
    12
  - execution
franta-hg@27
    13
  - debugging
franta-hg@27
    14
  - cleanup
franta-hg@27
    15
franta-hg@27
    16
-->
franta-hg@27
    17
<project xmlns:ear2="http://www.netbeans.org/ns/j2ee-earproject/2" basedir=".." default="default" name="nekurak.net-ear-impl">
franta-hg@186
    18
	<import file="ant-deploy.xml"/>
franta-hg@186
    19
	<fail message="Please build using Ant 1.7.1 or higher.">
franta-hg@186
    20
		<condition>
franta-hg@186
    21
			<not>
franta-hg@186
    22
				<antversion atleast="1.7.1"/>
franta-hg@186
    23
			</not>
franta-hg@186
    24
		</condition>
franta-hg@186
    25
	</fail>
franta-hg@186
    26
	<target depends="dist" description="Build whole project." name="default"/>
franta-hg@27
    27
    <!-- 
franta-hg@27
    28
    INITIALIZATION SECTION 
franta-hg@27
    29
    -->
franta-hg@186
    30
	<target name="pre-init">
franta-hg@27
    31
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
    32
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
    33
	</target>
franta-hg@186
    34
	<target depends="pre-init" name="init-private">
franta-hg@186
    35
		<property file="nbproject/private/private.properties"/>
franta-hg@186
    36
	</target>
franta-hg@186
    37
	<target depends="pre-init,init-private" name="init-userdir">
franta-hg@186
    38
		<property location="${netbeans.user}/build.properties" name="user.properties.file"/>
franta-hg@186
    39
	</target>
franta-hg@186
    40
	<target depends="pre-init,init-private,init-userdir" name="init-user">
franta-hg@186
    41
		<property file="${user.properties.file}"/>
franta-hg@186
    42
	</target>
franta-hg@186
    43
	<target depends="pre-init,init-private,init-userdir,init-user" name="init-project">
franta-hg@186
    44
		<property file="nbproject/project.properties"/>
franta-hg@186
    45
	</target>
franta-hg@186
    46
	<target depends="pre-init,init-private,init-userdir,init-user,init-project" name="do-init">
franta-hg@27
    47
        <!-- The two properties below are usually overridden -->
franta-hg@27
    48
        <!-- by the active platform. Just a fallback. -->
franta-hg@186
    49
		<property name="default.javac.source" value="1.4"/>
franta-hg@186
    50
		<property name="default.javac.target" value="1.4"/>
franta-hg@186
    51
		<condition property="do.compile.jsps">
franta-hg@186
    52
			<istrue value="${compile.jsps}"/>
franta-hg@186
    53
		</condition>
franta-hg@186
    54
		<condition property="do.display.browser">
franta-hg@186
    55
			<and>
franta-hg@186
    56
				<istrue value="${display.browser}"/>
franta-hg@186
    57
				<isset property="client.module.uri"/>
franta-hg@186
    58
				<not>
franta-hg@186
    59
					<isset property="app.client"/>
franta-hg@186
    60
				</not>
franta-hg@186
    61
			</and>
franta-hg@186
    62
		</condition>
franta-hg@186
    63
		<available file="${meta.inf}/MANIFEST.MF" property="has.custom.manifest"/>
franta-hg@27
    64
        <!--
franta-hg@27
    65
                    Variables needed to support directory deployment.
franta-hg@27
    66
                -->
franta-hg@186
    67
		<condition property="do.package.with.custom.manifest.not.directory.deploy">
franta-hg@186
    68
			<and>
franta-hg@186
    69
				<isset property="has.custom.manifest"/>
franta-hg@186
    70
				<isfalse value="${directory.deployment.supported}"/>
franta-hg@186
    71
			</and>
franta-hg@186
    72
		</condition>
franta-hg@186
    73
		<condition property="do.package.without.custom.manifest.not.directory.deploy">
franta-hg@186
    74
			<and>
franta-hg@186
    75
				<not>
franta-hg@186
    76
					<isset property="has.custom.manifest"/>
franta-hg@186
    77
				</not>
franta-hg@186
    78
				<isfalse value="${directory.deployment.supported}"/>
franta-hg@186
    79
			</and>
franta-hg@186
    80
		</condition>
franta-hg@186
    81
		<condition property="do.package.not.directory.deploy">
franta-hg@186
    82
			<isfalse value="${directory.deployment.supported}"/>
franta-hg@186
    83
		</condition>
franta-hg@27
    84
        <!--End Variables needed to support directory deployment.-->
franta-hg@186
    85
		<condition else="" property="j2ee.appclient.mainclass.tool.param" value="-mainclass ${main.class}">
franta-hg@186
    86
			<and>
franta-hg@186
    87
				<isset property="main.class"/>
franta-hg@186
    88
				<not>
franta-hg@186
    89
					<equals arg1="${main.class}" arg2="" trim="true"/>
franta-hg@186
    90
				</not>
franta-hg@186
    91
			</and>
franta-hg@186
    92
		</condition>
franta-hg@186
    93
		<condition else="" property="j2ee.appclient.jvmoptions.param" value="${j2ee.appclient.jvmoptions}">
franta-hg@186
    94
			<and>
franta-hg@186
    95
				<isset property="j2ee.appclient.jvmoptions"/>
franta-hg@186
    96
				<not>
franta-hg@186
    97
					<equals arg1="${j2ee.appclient.jvmoptions}" arg2="" trim="true"/>
franta-hg@186
    98
				</not>
franta-hg@186
    99
			</and>
franta-hg@186
   100
		</condition>
franta-hg@186
   101
		<condition else="" property="application.args.param" value="${application.args}">
franta-hg@186
   102
			<and>
franta-hg@186
   103
				<isset property="application.args"/>
franta-hg@186
   104
				<not>
franta-hg@186
   105
					<equals arg1="${application.args}" arg2="" trim="true"/>
franta-hg@186
   106
				</not>
franta-hg@186
   107
			</and>
franta-hg@186
   108
		</condition>
franta-hg@186
   109
		<condition property="can.debug.appclient">
franta-hg@186
   110
			<and>
franta-hg@186
   111
				<isset property="netbeans.home"/>
franta-hg@186
   112
				<isset property="app.client"/>
franta-hg@186
   113
			</and>
franta-hg@186
   114
		</condition>
franta-hg@186
   115
		<path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
franta-hg@186
   116
		<condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
franta-hg@186
   117
			<and>
franta-hg@186
   118
				<isset property="endorsed.classpath"/>
franta-hg@186
   119
				<length length="0" string="${endorsed.classpath}" when="greater"/>
franta-hg@186
   120
			</and>
franta-hg@186
   121
		</condition>
franta-hg@186
   122
	</target>
franta-hg@186
   123
	<target depends="init" name="-init-cos">
franta-hg@186
   124
		<condition else="false" property="build.deploy.on.save">
franta-hg@186
   125
			<istrue value="${j2ee.deploy.on.save}"/>
franta-hg@186
   126
		</condition>
franta-hg@186
   127
	</target>
franta-hg@186
   128
	<target name="post-init">
franta-hg@27
   129
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   130
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   131
	</target>
franta-hg@186
   132
	<target depends="pre-init,init-private,init-userdir,init-user,init-project,do-init" name="init-check">
franta-hg@186
   133
		<fail unless="build.dir">Must set build.dir</fail>
franta-hg@186
   134
		<fail unless="build.generated.dir">Must set build.generated.dir</fail>
franta-hg@186
   135
		<fail unless="dist.dir">Must set dist.dir</fail>
franta-hg@186
   136
		<fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
franta-hg@186
   137
		<fail unless="dist.jar">Must set dist.jar</fail>
franta-hg@186
   138
	</target>
franta-hg@186
   139
	<target name="-init-taskdefs">
franta-hg@186
   140
		<fail unless="libs.CopyLibs.classpath">
franta-hg@27
   141
The libs.CopyLibs.classpath property is not set up.
franta-hg@27
   142
This property must point to 
franta-hg@27
   143
org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
franta-hg@27
   144
of NetBeans IDE installation and is usually located at 
franta-hg@27
   145
&lt;netbeans_installation&gt;/java&lt;version&gt;/ant/extra folder.
franta-hg@27
   146
Either open the project in the IDE and make sure CopyLibs library
franta-hg@27
   147
exists or setup the property manually. For example like this:
franta-hg@27
   148
 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
franta-hg@186
   149
		</fail>
franta-hg@186
   150
		<taskdef classpath="${libs.CopyLibs.classpath}" resource="org/netbeans/modules/java/j2seproject/copylibstask/antlib.xml"/>
franta-hg@186
   151
	</target>
franta-hg@186
   152
	<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-check" name="profile-init"/>
franta-hg@186
   153
	<target name="-profile-pre-init">
franta-hg@186
   154
        <!-- Empty placeholder for easier customization. -->
franta-hg@186
   155
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   156
	</target>
franta-hg@186
   157
	<target name="-profile-post-init">
franta-hg@186
   158
        <!-- Empty placeholder for easier customization. -->
franta-hg@186
   159
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   160
	</target>
franta-hg@186
   161
	<target depends="-profile-pre-init, init, -profile-post-init" name="-profile-init-check">
franta-hg@186
   162
		<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
franta-hg@186
   163
		<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
franta-hg@186
   164
	</target>
franta-hg@186
   165
	<target depends="pre-init,init-private,init-userdir,init-user,init-project,do-init,post-init,init-check,-init-taskdefs" name="init"/>
franta-hg@27
   166
    <!--
franta-hg@27
   167
    COMPILATION SECTION
franta-hg@27
   168
    -->
franta-hg@186
   169
	<target depends="init" name="deps-jar" unless="no.deps"/>
franta-hg@186
   170
	<target depends="init" name="deps-j2ee-archive" unless="no.deps">
franta-hg@186
   171
		<condition property="build.deploy.on.save" value="false">
franta-hg@186
   172
			<not>
franta-hg@186
   173
				<isset property="build.deploy.on.save"/>
franta-hg@186
   174
			</not>
franta-hg@186
   175
		</condition>
franta-hg@186
   176
		<ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="dist-ear">
franta-hg@186
   177
			<property location="${build.dir}" name="dist.ear.dir"/>
franta-hg@186
   178
			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
franta-hg@186
   179
		</ant>
franta-hg@186
   180
		<condition property="build.deploy.on.save" value="false">
franta-hg@186
   181
			<not>
franta-hg@186
   182
				<isset property="build.deploy.on.save"/>
franta-hg@186
   183
			</not>
franta-hg@186
   184
		</condition>
franta-hg@186
   185
		<condition property="build.deploy.on.save" value="false">
franta-hg@186
   186
			<not>
franta-hg@186
   187
				<isset property="build.deploy.on.save"/>
franta-hg@186
   188
			</not>
franta-hg@186
   189
		</condition>
franta-hg@186
   190
		<ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="dist-ear">
franta-hg@186
   191
			<property location="${build.dir}" name="dist.ear.dir"/>
franta-hg@186
   192
			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
franta-hg@186
   193
		</ant>
franta-hg@186
   194
		<condition property="build.deploy.on.save" value="false">
franta-hg@186
   195
			<not>
franta-hg@186
   196
				<isset property="build.deploy.on.save"/>
franta-hg@186
   197
			</not>
franta-hg@186
   198
		</condition>
franta-hg@186
   199
	</target>
franta-hg@186
   200
	<target depends="init,deps-jar,deps-j2ee-archive" name="pre-pre-compile"/>
franta-hg@186
   201
	<target name="pre-compile">
franta-hg@27
   202
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   203
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   204
	</target>
franta-hg@186
   205
	<target depends="init,deps-jar,pre-pre-compile,pre-compile,-do-compile-deps" name="do-compile">
franta-hg@186
   206
		<copy todir="${build.dir}/META-INF">
franta-hg@186
   207
			<fileset dir="${meta.inf}"/>
franta-hg@186
   208
		</copy>
franta-hg@186
   209
	</target>
franta-hg@186
   210
	<target depends="init,deps-jar,pre-pre-compile,pre-compile" name="-do-compile-deps">
franta-hg@186
   211
		<copyfiles files="${reference.nekurak_net-web.dist-ear}" todir="${build.dir}//"/>
franta-hg@186
   212
		<copyfiles files="${reference.nekurak_net-ejb.dist-ear}" todir="${build.dir}//"/>
franta-hg@186
   213
	</target>
franta-hg@186
   214
	<target name="post-compile">
franta-hg@27
   215
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   216
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   217
	</target>
franta-hg@186
   218
	<target depends="init,deps-jar,pre-pre-compile,pre-compile,do-compile,post-compile" description="Compile project." name="compile"/>
franta-hg@27
   219
    <!--
franta-hg@27
   220
                DIST BUILDING SECTION
franta-hg@27
   221
            -->
franta-hg@186
   222
	<target name="pre-dist">
franta-hg@27
   223
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   224
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   225
	</target>
franta-hg@186
   226
	<target depends="init,compile,pre-dist" name="do-dist-without-manifest" unless="has.custom.manifest">
franta-hg@186
   227
		<dirname file="${dist.jar}" property="dist.jar.dir"/>
franta-hg@186
   228
		<mkdir dir="${dist.jar.dir}"/>
franta-hg@186
   229
		<jar compress="${jar.compress}" jarfile="${dist.jar}">
franta-hg@186
   230
			<fileset dir="${build.dir}"/>
franta-hg@186
   231
		</jar>
franta-hg@186
   232
	</target>
franta-hg@186
   233
	<target depends="init,compile,pre-dist" if="has.custom.manifest" name="do-dist-with-manifest">
franta-hg@186
   234
		<dirname file="${dist.jar}" property="dist.jar.dir"/>
franta-hg@186
   235
		<mkdir dir="${dist.jar.dir}"/>
franta-hg@186
   236
		<jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${meta.inf}/MANIFEST.MF">
franta-hg@186
   237
			<fileset dir="${build.dir}"/>
franta-hg@186
   238
		</jar>
franta-hg@186
   239
	</target>
franta-hg@27
   240
    <!--
franta-hg@27
   241
                TARGETS NEEDED TO SUPPORT DIRECTORY DEPLOYMENT
franta-hg@27
   242
            -->
franta-hg@186
   243
	<target depends="init,compile,pre-dist" if="do.package.without.custom.manifest.not.directory.deploy" name="-do-tmp-dist-without-manifest">
franta-hg@186
   244
		<dirname file="${dist.jar}" property="dist.jar.dir"/>
franta-hg@186
   245
		<mkdir dir="${dist.jar.dir}"/>
franta-hg@186
   246
		<jar compress="${jar.compress}" jarfile="${dist.jar}">
franta-hg@186
   247
			<fileset dir="${build.dir}"/>
franta-hg@186
   248
		</jar>
franta-hg@186
   249
	</target>
franta-hg@186
   250
	<target depends="init,compile,pre-dist" if="do.package.with.custom.manifest.not.directory.deploy" name="-do-tmp-dist-with-manifest">
franta-hg@186
   251
		<dirname file="${dist.jar}" property="dist.jar.dir"/>
franta-hg@186
   252
		<mkdir dir="${dist.jar.dir}"/>
franta-hg@186
   253
		<jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${meta.inf}/MANIFEST.MF">
franta-hg@186
   254
			<fileset dir="${build.dir}"/>
franta-hg@186
   255
		</jar>
franta-hg@186
   256
	</target>
franta-hg@186
   257
	<target depends="init,compile,pre-dist,-do-tmp-dist-without-manifest,-do-tmp-dist-with-manifest" name="-do-dist-directory-deploy"/>
franta-hg@186
   258
	<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"/>
franta-hg@27
   259
    <!--
franta-hg@27
   260
                END TARGETS NEEDED TO SUPPORT DIRECTORY DEPLOYMENT
franta-hg@27
   261
            -->
franta-hg@186
   262
	<target name="post-dist">
franta-hg@27
   263
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   264
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   265
	</target>
franta-hg@186
   266
	<target depends="init,compile,pre-dist,do-dist-without-manifest,do-dist-with-manifest,post-dist" description="Build distribution (JAR)." name="dist"/>
franta-hg@27
   267
    <!--
franta-hg@27
   268
    EXECUTION SECTION
franta-hg@27
   269
    -->
franta-hg@186
   270
	<target depends="run-deploy,run-display-browser,run-ac" description="Deploy to server." name="run"/>
franta-hg@186
   271
	<target name="pre-run-deploy">
franta-hg@27
   272
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   273
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   274
	</target>
franta-hg@186
   275
	<target name="post-run-deploy">
franta-hg@27
   276
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   277
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   278
	</target>
franta-hg@186
   279
	<target name="-pre-nbmodule-run-deploy">
franta-hg@27
   280
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   281
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
franta-hg@186
   282
	</target>
franta-hg@186
   283
	<target name="-post-nbmodule-run-deploy">
franta-hg@27
   284
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   285
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
franta-hg@186
   286
	</target>
franta-hg@186
   287
	<target name="-run-deploy-am" unless="no.deps">
franta-hg@27
   288
        <!-- Task to deploy to the Access Manager runtime. -->
franta-hg@186
   289
		<ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="-run-deploy-am"/>
franta-hg@186
   290
		<ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="-run-deploy-am"/>
franta-hg@186
   291
	</target>
franta-hg@186
   292
	<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"/>
franta-hg@186
   293
	<target if="netbeans.home" name="-run-deploy-nb">
franta-hg@186
   294
		<nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
franta-hg@186
   295
	</target>
franta-hg@186
   296
	<target name="-init-deploy-ant" unless="netbeans.home">
franta-hg@186
   297
		<property name="deploy.ant.archive" value="${dist.jar}"/>
franta-hg@186
   298
		<property name="deploy.ant.resource.dir" value="${resource.dir}"/>
franta-hg@186
   299
		<property name="deploy.ant.enabled" value="true"/>
franta-hg@186
   300
	</target>
franta-hg@186
   301
	<target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
franta-hg@186
   302
	<target if="netbeans.home" name="-run-undeploy-nb">
franta-hg@186
   303
		<fail message="Undeploy is not supported from within the IDE"/>
franta-hg@186
   304
	</target>
franta-hg@186
   305
	<target depends="dist" name="verify">
franta-hg@186
   306
		<nbverify file="${dist.jar}"/>
franta-hg@186
   307
	</target>
franta-hg@186
   308
	<target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
franta-hg@186
   309
	<target if="do.display.browser" name="-init-display-browser">
franta-hg@186
   310
		<condition property="do.display.browser.nb">
franta-hg@186
   311
			<isset property="netbeans.home"/>
franta-hg@186
   312
		</condition>
franta-hg@186
   313
		<condition property="do.display.browser.cl">
franta-hg@186
   314
			<and>
franta-hg@186
   315
				<isset property="deploy.ant.enabled"/>
franta-hg@186
   316
				<isset property="deploy.ant.client.url"/>
franta-hg@186
   317
			</and>
franta-hg@186
   318
		</condition>
franta-hg@186
   319
	</target>
franta-hg@186
   320
	<target if="do.display.browser.nb" name="-display-browser-nb">
franta-hg@186
   321
		<nbbrowse url="${client.url}"/>
franta-hg@186
   322
	</target>
franta-hg@186
   323
	<target if="do.display.browser.cl" name="-get-browser" unless="browser">
franta-hg@186
   324
		<condition property="browser" value="rundll32">
franta-hg@186
   325
			<os family="windows"/>
franta-hg@186
   326
		</condition>
franta-hg@186
   327
		<condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
franta-hg@186
   328
			<os family="windows"/>
franta-hg@186
   329
		</condition>
franta-hg@186
   330
		<condition property="browser" value="/usr/bin/open">
franta-hg@186
   331
			<os family="mac"/>
franta-hg@186
   332
		</condition>
franta-hg@186
   333
		<property environment="env"/>
franta-hg@186
   334
		<condition property="browser" value="${env.BROWSER}">
franta-hg@186
   335
			<isset property="env.BROWSER"/>
franta-hg@186
   336
		</condition>
franta-hg@186
   337
		<condition property="browser" value="/usr/bin/firefox">
franta-hg@186
   338
			<available file="/usr/bin/firefox"/>
franta-hg@186
   339
		</condition>
franta-hg@186
   340
		<condition property="browser" value="/usr/local/firefox/firefox">
franta-hg@186
   341
			<available file="/usr/local/firefox/firefox"/>
franta-hg@186
   342
		</condition>
franta-hg@186
   343
		<condition property="browser" value="/usr/bin/mozilla">
franta-hg@186
   344
			<available file="/usr/bin/mozilla"/>
franta-hg@186
   345
		</condition>
franta-hg@186
   346
		<condition property="browser" value="/usr/local/mozilla/mozilla">
franta-hg@186
   347
			<available file="/usr/local/mozilla/mozilla"/>
franta-hg@186
   348
		</condition>
franta-hg@186
   349
		<condition property="browser" value="/usr/sfw/lib/firefox/firefox">
franta-hg@186
   350
			<available file="/usr/sfw/lib/firefox/firefox"/>
franta-hg@186
   351
		</condition>
franta-hg@186
   352
		<condition property="browser" value="/opt/csw/bin/firefox">
franta-hg@186
   353
			<available file="/opt/csw/bin/firefox"/>
franta-hg@186
   354
		</condition>
franta-hg@186
   355
		<condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
franta-hg@186
   356
			<available file="/usr/sfw/lib/mozilla/mozilla"/>
franta-hg@186
   357
		</condition>
franta-hg@186
   358
		<condition property="browser" value="/opt/csw/bin/mozilla">
franta-hg@186
   359
			<available file="/opt/csw/bin/mozilla"/>
franta-hg@186
   360
		</condition>
franta-hg@186
   361
	</target>
franta-hg@186
   362
	<target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
franta-hg@186
   363
		<fail unless="browser">
franta-hg@27
   364
            Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
franta-hg@186
   365
		</fail>
franta-hg@186
   366
		<property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
franta-hg@186
   367
		<echo>Launching ${browse.url}</echo>
franta-hg@186
   368
		<exec executable="${browser}" spawn="true">
franta-hg@186
   369
			<arg line="${browser.args} ${browse.url}"/>
franta-hg@186
   370
		</exec>
franta-hg@186
   371
	</target>
franta-hg@186
   372
	<target if="app.client" name="run-ac">
franta-hg@186
   373
		<antcall target="-run-ac"/>
franta-hg@186
   374
	</target>
franta-hg@186
   375
	<target depends="init,-as-retrieve-option-workaround,-init-run-macros,-run-appclient-pregfv3,-run-appclient" name="-run-ac"/>
franta-hg@186
   376
	<target if="j2ee.appclient.tool.args" name="-run-appclient-pregfv3">
franta-hg@186
   377
		<ear2:run-appclient-pregfv3/>
franta-hg@186
   378
	</target>
franta-hg@186
   379
	<target name="-run-appclient" unless="j2ee.appclient.tool.args">
franta-hg@186
   380
		<ear2:run-appclient subprojectname="${app.client}"/>
franta-hg@186
   381
	</target>
franta-hg@186
   382
	<target if="j2ee.appclient.mainclass.args" name="-as-retrieve-option-workaround" unless="j2ee.clientName">
franta-hg@186
   383
		<property name="client.jar" value="${dist.dir}/nekurak.net-earClient.jar"/>
franta-hg@186
   384
		<sleep seconds="3"/>
franta-hg@186
   385
		<copy failonerror="false" file="${wa.copy.client.jar.from}/nekurak.net-ear/nekurak.net-earClient.jar" todir="${dist.dir}"/>
franta-hg@186
   386
		<copy failonerror="false" flatten="true" todir="${dist.dir}/">
franta-hg@186
   387
			<fileset dir="${wa.copy.client.jar.from}/nekurak.net-ear" includes="**/nekurak.net-earClient.jar"/>
franta-hg@186
   388
		</copy>
franta-hg@186
   389
		<copy flatten="true" todir="${dist.dir}/nekurak.net-earClient">
franta-hg@186
   390
			<fileset dir="${wa.copy.client.jar.from}/nekurak.net-ear" includes="**/*.*ar"/>
franta-hg@186
   391
		</copy>
franta-hg@186
   392
		<copy failonerror="false" flatten="false" todir="${dist.dir}/nekurak.net-earClient">
franta-hg@186
   393
			<fileset dir="${dist.dir}/gfdeploy/nekurak.net-ear" includes="**/*.jar"/>
franta-hg@186
   394
		</copy>
franta-hg@186
   395
	</target>
franta-hg@186
   396
	<target depends="init" name="-init-run-macros">
franta-hg@186
   397
		<macrodef name="run-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
franta-hg@186
   398
			<attribute name="subprojectname"/>
franta-hg@186
   399
			<attribute default="${application.args.param}" name="args"/>
franta-hg@186
   400
			<element name="customize" optional="true"/>
franta-hg@186
   401
			<sequential>
franta-hg@186
   402
				<java dir="${basedir}" fork="true" jar="${client.jar}">
franta-hg@186
   403
					<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@186
   404
					<jvmarg line="${j2ee.appclient.tool.jvmoptions}${client.jar},arg=-name,arg=@{subprojectname}"/>
franta-hg@186
   405
					<jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
franta-hg@186
   406
					<arg line="@{args}"/>
franta-hg@186
   407
					<syspropertyset>
franta-hg@186
   408
						<propertyref prefix="run-sys-prop."/>
franta-hg@186
   409
						<mapper from="run-sys-prop.*" to="*" type="glob"/>
franta-hg@186
   410
					</syspropertyset>
franta-hg@186
   411
					<customize/>
franta-hg@186
   412
				</java>
franta-hg@186
   413
			</sequential>
franta-hg@186
   414
		</macrodef>
franta-hg@186
   415
		<macrodef name="run-appclient-pregfv3" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
franta-hg@186
   416
			<element name="customize" optional="true"/>
franta-hg@186
   417
			<sequential>
franta-hg@186
   418
				<java classname="${j2ee.appclient.tool.mainclass}" fork="true">
franta-hg@186
   419
					<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@186
   420
					<jvmarg line="${j2ee.appclient.tool.jvmoptions}"/>
franta-hg@186
   421
					<jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
franta-hg@186
   422
					<arg line="${j2ee.appclient.tool.args}"/>
franta-hg@186
   423
					<arg line="-client ${client.jar}"/>
franta-hg@186
   424
					<arg line="${j2ee.appclient.mainclass.tool.param}"/>
franta-hg@186
   425
					<arg line="${application.args.param}"/>
franta-hg@186
   426
					<classpath>
franta-hg@186
   427
						<path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
franta-hg@186
   428
					</classpath>
franta-hg@186
   429
					<syspropertyset>
franta-hg@186
   430
						<propertyref prefix="run-sys-prop."/>
franta-hg@186
   431
						<mapper from="run-sys-prop.*" to="*" type="glob"/>
franta-hg@186
   432
					</syspropertyset>
franta-hg@186
   433
					<customize/>
franta-hg@186
   434
				</java>
franta-hg@186
   435
			</sequential>
franta-hg@186
   436
		</macrodef>
franta-hg@186
   437
	</target>
franta-hg@27
   438
    <!--
franta-hg@27
   439
    DEBUGGING SECTION
franta-hg@27
   440
    -->
franta-hg@186
   441
	<target depends="run-debug,run-debug-appclient" description="Deploy to server." name="debug"/>
franta-hg@186
   442
	<target depends="dist" description="Debug project in IDE." if="netbeans.home" name="run-debug" unless="app.client">
franta-hg@186
   443
		<nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="true"/>
franta-hg@186
   444
		<antcall target="connect-debugger"/>
franta-hg@186
   445
		<antcall target="debug-display-browser"/>
franta-hg@186
   446
	</target>
franta-hg@186
   447
	<target name="connect-debugger" unless="is.debugged">
franta-hg@186
   448
		<nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${jpda.host}:${jpda.address}" transport="${jpda.transport}">
franta-hg@186
   449
			<classpath>
franta-hg@186
   450
				<path path="${debug.classpath}"/>
franta-hg@186
   451
				<fileset dir="${build.dir}" includes="lib/*.jar"/>
franta-hg@186
   452
			</classpath>
franta-hg@186
   453
			<sourcepath>
franta-hg@186
   454
				<path path="${ear.docbase.dirs}"/>
franta-hg@186
   455
			</sourcepath>
franta-hg@186
   456
		</nbjpdaconnect>
franta-hg@186
   457
	</target>
franta-hg@186
   458
	<target if="do.display.browser" name="debug-display-browser">
franta-hg@186
   459
		<nbbrowse url="${client.url}"/>
franta-hg@186
   460
	</target>
franta-hg@186
   461
	<target if="can.debug.appclient" name="run-debug-appclient">
franta-hg@186
   462
		<antcall target="-run-debug-appclient"/>
franta-hg@186
   463
	</target>
franta-hg@186
   464
	<target depends="init,-init-debug-args,-debug-appclient-deploy,-as-retrieve-option-workaround,-init-debug-macros,-debug-appclient-start-nbjpda,-debug-appclient-pregfv3,-debug-appclient,connect-debugger" name="-run-debug-appclient"/>
franta-hg@186
   465
	<target name="-init-debug-args">
franta-hg@186
   466
		<property name="version-output" value="java version &quot;${ant.java.version}"/>
franta-hg@186
   467
		<condition property="have-jdk-older-than-1.4">
franta-hg@186
   468
			<or>
franta-hg@186
   469
				<contains string="${version-output}" substring="java version &quot;1.0"/>
franta-hg@186
   470
				<contains string="${version-output}" substring="java version &quot;1.1"/>
franta-hg@186
   471
				<contains string="${version-output}" substring="java version &quot;1.2"/>
franta-hg@186
   472
				<contains string="${version-output}" substring="java version &quot;1.3"/>
franta-hg@186
   473
			</or>
franta-hg@186
   474
		</condition>
franta-hg@186
   475
		<condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
franta-hg@186
   476
			<istrue value="${have-jdk-older-than-1.4}"/>
franta-hg@186
   477
		</condition>
franta-hg@186
   478
	</target>
franta-hg@186
   479
	<target depends="init,-init-debug-args,-as-retrieve-option-workaround,-init-run-macros" name="-init-debug-macros">
franta-hg@186
   480
		<condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
franta-hg@186
   481
			<os family="windows"/>
franta-hg@186
   482
		</condition>
franta-hg@186
   483
		<condition else="${debug-transport-by-os}" property="debug-transport-appclient" value="${debug.transport}">
franta-hg@186
   484
			<isset property="debug.transport"/>
franta-hg@186
   485
		</condition>
franta-hg@186
   486
		<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
franta-hg@186
   487
			<attribute default="${main.class}" name="name"/>
franta-hg@186
   488
			<attribute default="${debug.classpath}" name="classpath"/>
franta-hg@186
   489
			<attribute default="" name="stopclassname"/>
franta-hg@186
   490
			<sequential>
franta-hg@186
   491
				<nbjpdastart addressproperty="jpda.address.appclient" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport-appclient}">
franta-hg@186
   492
					<classpath>
franta-hg@186
   493
						<path path="@{classpath}"/>
franta-hg@186
   494
					</classpath>
franta-hg@186
   495
				</nbjpdastart>
franta-hg@186
   496
			</sequential>
franta-hg@186
   497
		</macrodef>
franta-hg@186
   498
		<macrodef name="debug-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
franta-hg@186
   499
			<attribute name="subprojectname"/>
franta-hg@186
   500
			<sequential>
franta-hg@186
   501
				<ear2:run-appclient subprojectname="@{subprojectname}">
franta-hg@186
   502
					<customize>
franta-hg@186
   503
						<jvmarg value="-Xrunjdwp:transport=${debug-transport-appclient},address=${jpda.address.appclient}"/>
franta-hg@186
   504
						<jvmarg line="${debug-args-line}"/>
franta-hg@186
   505
					</customize>
franta-hg@186
   506
				</ear2:run-appclient>
franta-hg@186
   507
			</sequential>
franta-hg@186
   508
		</macrodef>
franta-hg@186
   509
		<macrodef name="debug-appclient-pregfv3" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
franta-hg@186
   510
			<sequential>
franta-hg@186
   511
				<ear2:run-appclient-pregfv3>
franta-hg@186
   512
					<customize>
franta-hg@186
   513
						<jvmarg value="-Xrunjdwp:transport=${debug-transport-appclient},address=${jpda.address.appclient}"/>
franta-hg@186
   514
						<jvmarg line="${debug-args-line}"/>
franta-hg@186
   515
					</customize>
franta-hg@186
   516
				</ear2:run-appclient-pregfv3>
franta-hg@186
   517
			</sequential>
franta-hg@186
   518
		</macrodef>
franta-hg@186
   519
	</target>
franta-hg@186
   520
	<target name="-debug-appclient-deploy">
franta-hg@186
   521
		<nbstartserver debugmode="true"/>
franta-hg@186
   522
		<nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="true"/>
franta-hg@186
   523
	</target>
franta-hg@186
   524
	<target name="-debug-appclient-start-nbjpda">
franta-hg@186
   525
		<ear2:nbjpdastart classpath="" name="${app.client}"/>
franta-hg@186
   526
	</target>
franta-hg@186
   527
	<target if="j2ee.appclient.tool.args" name="-debug-appclient-pregfv3">
franta-hg@186
   528
		<ear2:debug-appclient-pregfv3/>
franta-hg@186
   529
	</target>
franta-hg@186
   530
	<target name="-debug-appclient" unless="j2ee.appclient.tool.args">
franta-hg@186
   531
		<ear2:debug-appclient subprojectname="${app.client}"/>
franta-hg@186
   532
	</target>
franta-hg@186
   533
    <!--
franta-hg@186
   534
    =================
franta-hg@186
   535
    PROFILING SECTION
franta-hg@186
   536
    =================
franta-hg@186
   537
    -->
franta-hg@186
   538
	<target description="Profile a J2EE project in the IDE." name="profile">
franta-hg@186
   539
		<condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">
franta-hg@186
   540
			<isset property="profiler.info.jvmargs.extra"/>
franta-hg@186
   541
		</condition>
franta-hg@186
   542
		<antcall target="${profiler.startserver.target}"/>
franta-hg@186
   543
		<antcall target="run"/>
franta-hg@186
   544
		<antcall target="start-loadgen"/>
franta-hg@186
   545
	</target>
franta-hg@186
   546
	<target name="start-profiled-server">
franta-hg@186
   547
		<nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
franta-hg@186
   548
			<jvmarg value="${profiler.info.jvmargs.agent}"/>
franta-hg@186
   549
			<jvmarg value="${profiler.j2ee.agentID}"/>
franta-hg@186
   550
		</nbstartprofiledserver>
franta-hg@186
   551
	</target>
franta-hg@186
   552
	<target name="start-profiled-server-extraargs">
franta-hg@186
   553
		<nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
franta-hg@186
   554
			<jvmarg value="${profiler.info.jvmargs.extra}"/>
franta-hg@186
   555
			<jvmarg value="${profiler.info.jvmargs.agent}"/>
franta-hg@186
   556
			<jvmarg value="${profiler.j2ee.agentID}"/>
franta-hg@186
   557
		</nbstartprofiledserver>
franta-hg@186
   558
	</target>
franta-hg@186
   559
	<target if="profiler.loadgen.path" name="start-loadgen">
franta-hg@186
   560
		<loadgenstart path="${profiler.loadgen.path}"/>
franta-hg@186
   561
	</target>
franta-hg@27
   562
    <!--
franta-hg@27
   563
    CLEANUP SECTION
franta-hg@27
   564
    -->
franta-hg@186
   565
	<target depends="init" name="deps-clean" unless="no.deps">
franta-hg@186
   566
		<condition property="build.deploy.on.save" value="false">
franta-hg@186
   567
			<not>
franta-hg@186
   568
				<isset property="build.deploy.on.save"/>
franta-hg@186
   569
			</not>
franta-hg@186
   570
		</condition>
franta-hg@186
   571
		<ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="clean-ear">
franta-hg@186
   572
			<property location="${build.dir}" name="dist.ear.dir"/>
franta-hg@186
   573
			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
franta-hg@186
   574
		</ant>
franta-hg@186
   575
		<condition property="build.deploy.on.save" value="false">
franta-hg@186
   576
			<not>
franta-hg@186
   577
				<isset property="build.deploy.on.save"/>
franta-hg@186
   578
			</not>
franta-hg@186
   579
		</condition>
franta-hg@186
   580
		<condition property="build.deploy.on.save" value="false">
franta-hg@186
   581
			<not>
franta-hg@186
   582
				<isset property="build.deploy.on.save"/>
franta-hg@186
   583
			</not>
franta-hg@186
   584
		</condition>
franta-hg@186
   585
		<ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="clean-ear">
franta-hg@186
   586
			<property location="${build.dir}" name="dist.ear.dir"/>
franta-hg@186
   587
			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
franta-hg@186
   588
		</ant>
franta-hg@186
   589
		<condition property="build.deploy.on.save" value="false">
franta-hg@186
   590
			<not>
franta-hg@186
   591
				<isset property="build.deploy.on.save"/>
franta-hg@186
   592
			</not>
franta-hg@186
   593
		</condition>
franta-hg@186
   594
	</target>
franta-hg@186
   595
	<target depends="init" name="do-clean">
franta-hg@186
   596
		<delete dir="${build.dir}"/>
franta-hg@186
   597
		<delete dir="${dist.dir}"/>
franta-hg@186
   598
		<delete dir="${build.dir}"/>
franta-hg@186
   599
	</target>
franta-hg@186
   600
	<target depends="init" if="netbeans.home" name="undeploy-clean">
franta-hg@186
   601
		<nbundeploy failOnError="false" startServer="false"/>
franta-hg@186
   602
	</target>
franta-hg@186
   603
	<target name="post-clean">
franta-hg@27
   604
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   605
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   606
	</target>
franta-hg@186
   607
	<target depends="init,undeploy-clean,deps-clean,do-clean,post-clean" description="Clean build products." name="clean"/>
franta-hg@27
   608
</project>