java/nekurak.net-ear/nbproject/build-impl.xml
author František Kučera <franta-hg@frantovo.cz>
Fri Jul 15 22:25:39 2011 +0200 (2011-07-15)
changeset 186 b0f7d9ab4a07
parent 142 44ef544460ca
child 188 74d06a8a4948
permissions -rw-r--r--
Glassfish 3.1.1
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
		<ant antfile="${project.nekurak_net-rest}/build.xml" inheritall="false" target="dist-ear">
franta-hg@186
   186
			<property location="${build.dir}" name="dist.ear.dir"/>
franta-hg@186
   187
			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
franta-hg@186
   188
		</ant>
franta-hg@186
   189
		<condition property="build.deploy.on.save" value="false">
franta-hg@186
   190
			<not>
franta-hg@186
   191
				<isset property="build.deploy.on.save"/>
franta-hg@186
   192
			</not>
franta-hg@186
   193
		</condition>
franta-hg@186
   194
		<ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="dist-ear">
franta-hg@186
   195
			<property location="${build.dir}" name="dist.ear.dir"/>
franta-hg@186
   196
			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
franta-hg@186
   197
		</ant>
franta-hg@186
   198
		<condition property="build.deploy.on.save" value="false">
franta-hg@186
   199
			<not>
franta-hg@186
   200
				<isset property="build.deploy.on.save"/>
franta-hg@186
   201
			</not>
franta-hg@186
   202
		</condition>
franta-hg@186
   203
		<ant antfile="${project.nekurak_net-ws}/build.xml" inheritall="false" target="dist-ear">
franta-hg@186
   204
			<property location="${build.dir}" name="dist.ear.dir"/>
franta-hg@186
   205
			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
franta-hg@186
   206
		</ant>
franta-hg@186
   207
	</target>
franta-hg@186
   208
	<target depends="init,deps-jar,deps-j2ee-archive" name="pre-pre-compile"/>
franta-hg@186
   209
	<target name="pre-compile">
franta-hg@27
   210
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   211
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   212
	</target>
franta-hg@186
   213
	<target depends="init,deps-jar,pre-pre-compile,pre-compile,-do-compile-deps" name="do-compile">
franta-hg@186
   214
		<copy todir="${build.dir}/META-INF">
franta-hg@186
   215
			<fileset dir="${meta.inf}"/>
franta-hg@186
   216
		</copy>
franta-hg@186
   217
	</target>
franta-hg@186
   218
	<target depends="init,deps-jar,pre-pre-compile,pre-compile" name="-do-compile-deps">
franta-hg@186
   219
		<copyfiles files="${reference.nekurak_net-web.dist-ear}" todir="${build.dir}//"/>
franta-hg@186
   220
		<copyfiles files="${reference.nekurak_net-ejb.dist-ear}" todir="${build.dir}//"/>
franta-hg@186
   221
		<copyfiles files="${reference.nekurak_net-rest.dist-ear}" todir="${build.dir}//"/>
franta-hg@186
   222
		<copyfiles files="${reference.nekurak_net-ws.dist-ear}" todir="${build.dir}//"/>
franta-hg@186
   223
	</target>
franta-hg@186
   224
	<target name="post-compile">
franta-hg@27
   225
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   226
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   227
	</target>
franta-hg@186
   228
	<target depends="init,deps-jar,pre-pre-compile,pre-compile,do-compile,post-compile" description="Compile project." name="compile"/>
franta-hg@27
   229
    <!--
franta-hg@27
   230
                DIST BUILDING SECTION
franta-hg@27
   231
            -->
franta-hg@186
   232
	<target name="pre-dist">
franta-hg@27
   233
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   234
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   235
	</target>
franta-hg@186
   236
	<target depends="init,compile,pre-dist" name="do-dist-without-manifest" unless="has.custom.manifest">
franta-hg@186
   237
		<dirname file="${dist.jar}" property="dist.jar.dir"/>
franta-hg@186
   238
		<mkdir dir="${dist.jar.dir}"/>
franta-hg@186
   239
		<jar compress="${jar.compress}" jarfile="${dist.jar}">
franta-hg@186
   240
			<fileset dir="${build.dir}"/>
franta-hg@186
   241
		</jar>
franta-hg@186
   242
	</target>
franta-hg@186
   243
	<target depends="init,compile,pre-dist" if="has.custom.manifest" name="do-dist-with-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}" manifest="${meta.inf}/MANIFEST.MF">
franta-hg@186
   247
			<fileset dir="${build.dir}"/>
franta-hg@186
   248
		</jar>
franta-hg@186
   249
	</target>
franta-hg@27
   250
    <!--
franta-hg@27
   251
                TARGETS NEEDED TO SUPPORT DIRECTORY DEPLOYMENT
franta-hg@27
   252
            -->
franta-hg@186
   253
	<target depends="init,compile,pre-dist" if="do.package.without.custom.manifest.not.directory.deploy" name="-do-tmp-dist-without-manifest">
franta-hg@186
   254
		<dirname file="${dist.jar}" property="dist.jar.dir"/>
franta-hg@186
   255
		<mkdir dir="${dist.jar.dir}"/>
franta-hg@186
   256
		<jar compress="${jar.compress}" jarfile="${dist.jar}">
franta-hg@186
   257
			<fileset dir="${build.dir}"/>
franta-hg@186
   258
		</jar>
franta-hg@186
   259
	</target>
franta-hg@186
   260
	<target depends="init,compile,pre-dist" if="do.package.with.custom.manifest.not.directory.deploy" name="-do-tmp-dist-with-manifest">
franta-hg@186
   261
		<dirname file="${dist.jar}" property="dist.jar.dir"/>
franta-hg@186
   262
		<mkdir dir="${dist.jar.dir}"/>
franta-hg@186
   263
		<jar compress="${jar.compress}" jarfile="${dist.jar}" manifest="${meta.inf}/MANIFEST.MF">
franta-hg@186
   264
			<fileset dir="${build.dir}"/>
franta-hg@186
   265
		</jar>
franta-hg@186
   266
	</target>
franta-hg@186
   267
	<target depends="init,compile,pre-dist,-do-tmp-dist-without-manifest,-do-tmp-dist-with-manifest" name="-do-dist-directory-deploy"/>
franta-hg@186
   268
	<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
   269
    <!--
franta-hg@27
   270
                END TARGETS NEEDED TO SUPPORT DIRECTORY DEPLOYMENT
franta-hg@27
   271
            -->
franta-hg@186
   272
	<target name="post-dist">
franta-hg@27
   273
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   274
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   275
	</target>
franta-hg@186
   276
	<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
   277
    <!--
franta-hg@27
   278
    EXECUTION SECTION
franta-hg@27
   279
    -->
franta-hg@186
   280
	<target depends="run-deploy,run-display-browser,run-ac" description="Deploy to server." name="run"/>
franta-hg@186
   281
	<target name="pre-run-deploy">
franta-hg@27
   282
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   283
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   284
	</target>
franta-hg@186
   285
	<target name="post-run-deploy">
franta-hg@27
   286
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   287
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   288
	</target>
franta-hg@186
   289
	<target name="-pre-nbmodule-run-deploy">
franta-hg@27
   290
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   291
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
franta-hg@186
   292
	</target>
franta-hg@186
   293
	<target name="-post-nbmodule-run-deploy">
franta-hg@27
   294
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   295
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
franta-hg@186
   296
	</target>
franta-hg@186
   297
	<target name="-run-deploy-am" unless="no.deps">
franta-hg@27
   298
        <!-- Task to deploy to the Access Manager runtime. -->
franta-hg@186
   299
		<ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="-run-deploy-am"/>
franta-hg@186
   300
		<ant antfile="${project.nekurak_net-rest}/build.xml" inheritall="false" target="-run-deploy-am"/>
franta-hg@186
   301
		<ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="-run-deploy-am"/>
franta-hg@186
   302
		<ant antfile="${project.nekurak_net-ws}/build.xml" inheritall="false" target="-run-deploy-am"/>
franta-hg@186
   303
	</target>
franta-hg@186
   304
	<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
   305
	<target if="netbeans.home" name="-run-deploy-nb">
franta-hg@186
   306
		<nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
franta-hg@186
   307
	</target>
franta-hg@186
   308
	<target name="-init-deploy-ant" unless="netbeans.home">
franta-hg@186
   309
		<property name="deploy.ant.archive" value="${dist.jar}"/>
franta-hg@186
   310
		<property name="deploy.ant.resource.dir" value="${resource.dir}"/>
franta-hg@186
   311
		<property name="deploy.ant.enabled" value="true"/>
franta-hg@186
   312
	</target>
franta-hg@186
   313
	<target depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant" name="run-undeploy"/>
franta-hg@186
   314
	<target if="netbeans.home" name="-run-undeploy-nb">
franta-hg@186
   315
		<fail message="Undeploy is not supported from within the IDE"/>
franta-hg@186
   316
	</target>
franta-hg@186
   317
	<target depends="dist" name="verify">
franta-hg@186
   318
		<nbverify file="${dist.jar}"/>
franta-hg@186
   319
	</target>
franta-hg@186
   320
	<target depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl" name="run-display-browser"/>
franta-hg@186
   321
	<target if="do.display.browser" name="-init-display-browser">
franta-hg@186
   322
		<condition property="do.display.browser.nb">
franta-hg@186
   323
			<isset property="netbeans.home"/>
franta-hg@186
   324
		</condition>
franta-hg@186
   325
		<condition property="do.display.browser.cl">
franta-hg@186
   326
			<and>
franta-hg@186
   327
				<isset property="deploy.ant.enabled"/>
franta-hg@186
   328
				<isset property="deploy.ant.client.url"/>
franta-hg@186
   329
			</and>
franta-hg@186
   330
		</condition>
franta-hg@186
   331
	</target>
franta-hg@186
   332
	<target if="do.display.browser.nb" name="-display-browser-nb">
franta-hg@186
   333
		<nbbrowse url="${client.url}"/>
franta-hg@186
   334
	</target>
franta-hg@186
   335
	<target if="do.display.browser.cl" name="-get-browser" unless="browser">
franta-hg@186
   336
		<condition property="browser" value="rundll32">
franta-hg@186
   337
			<os family="windows"/>
franta-hg@186
   338
		</condition>
franta-hg@186
   339
		<condition else="" property="browser.args" value="url.dll,FileProtocolHandler">
franta-hg@186
   340
			<os family="windows"/>
franta-hg@186
   341
		</condition>
franta-hg@186
   342
		<condition property="browser" value="/usr/bin/open">
franta-hg@186
   343
			<os family="mac"/>
franta-hg@186
   344
		</condition>
franta-hg@186
   345
		<property environment="env"/>
franta-hg@186
   346
		<condition property="browser" value="${env.BROWSER}">
franta-hg@186
   347
			<isset property="env.BROWSER"/>
franta-hg@186
   348
		</condition>
franta-hg@186
   349
		<condition property="browser" value="/usr/bin/firefox">
franta-hg@186
   350
			<available file="/usr/bin/firefox"/>
franta-hg@186
   351
		</condition>
franta-hg@186
   352
		<condition property="browser" value="/usr/local/firefox/firefox">
franta-hg@186
   353
			<available file="/usr/local/firefox/firefox"/>
franta-hg@186
   354
		</condition>
franta-hg@186
   355
		<condition property="browser" value="/usr/bin/mozilla">
franta-hg@186
   356
			<available file="/usr/bin/mozilla"/>
franta-hg@186
   357
		</condition>
franta-hg@186
   358
		<condition property="browser" value="/usr/local/mozilla/mozilla">
franta-hg@186
   359
			<available file="/usr/local/mozilla/mozilla"/>
franta-hg@186
   360
		</condition>
franta-hg@186
   361
		<condition property="browser" value="/usr/sfw/lib/firefox/firefox">
franta-hg@186
   362
			<available file="/usr/sfw/lib/firefox/firefox"/>
franta-hg@186
   363
		</condition>
franta-hg@186
   364
		<condition property="browser" value="/opt/csw/bin/firefox">
franta-hg@186
   365
			<available file="/opt/csw/bin/firefox"/>
franta-hg@186
   366
		</condition>
franta-hg@186
   367
		<condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
franta-hg@186
   368
			<available file="/usr/sfw/lib/mozilla/mozilla"/>
franta-hg@186
   369
		</condition>
franta-hg@186
   370
		<condition property="browser" value="/opt/csw/bin/mozilla">
franta-hg@186
   371
			<available file="/opt/csw/bin/mozilla"/>
franta-hg@186
   372
		</condition>
franta-hg@186
   373
	</target>
franta-hg@186
   374
	<target depends="-get-browser" if="do.display.browser.cl" name="-display-browser-cl">
franta-hg@186
   375
		<fail unless="browser">
franta-hg@27
   376
            Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
franta-hg@186
   377
		</fail>
franta-hg@186
   378
		<property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
franta-hg@186
   379
		<echo>Launching ${browse.url}</echo>
franta-hg@186
   380
		<exec executable="${browser}" spawn="true">
franta-hg@186
   381
			<arg line="${browser.args} ${browse.url}"/>
franta-hg@186
   382
		</exec>
franta-hg@186
   383
	</target>
franta-hg@186
   384
	<target if="app.client" name="run-ac">
franta-hg@186
   385
		<antcall target="-run-ac"/>
franta-hg@186
   386
	</target>
franta-hg@186
   387
	<target depends="init,-as-retrieve-option-workaround,-init-run-macros,-run-appclient-pregfv3,-run-appclient" name="-run-ac"/>
franta-hg@186
   388
	<target if="j2ee.appclient.tool.args" name="-run-appclient-pregfv3">
franta-hg@186
   389
		<ear2:run-appclient-pregfv3/>
franta-hg@186
   390
	</target>
franta-hg@186
   391
	<target name="-run-appclient" unless="j2ee.appclient.tool.args">
franta-hg@186
   392
		<ear2:run-appclient subprojectname="${app.client}"/>
franta-hg@186
   393
	</target>
franta-hg@186
   394
	<target if="j2ee.appclient.mainclass.args" name="-as-retrieve-option-workaround" unless="j2ee.clientName">
franta-hg@186
   395
		<property name="client.jar" value="${dist.dir}/nekurak.net-earClient.jar"/>
franta-hg@186
   396
		<sleep seconds="3"/>
franta-hg@186
   397
		<copy failonerror="false" file="${wa.copy.client.jar.from}/nekurak.net-ear/nekurak.net-earClient.jar" todir="${dist.dir}"/>
franta-hg@186
   398
		<copy failonerror="false" flatten="true" todir="${dist.dir}/">
franta-hg@186
   399
			<fileset dir="${wa.copy.client.jar.from}/nekurak.net-ear" includes="**/nekurak.net-earClient.jar"/>
franta-hg@186
   400
		</copy>
franta-hg@186
   401
		<copy flatten="true" todir="${dist.dir}/nekurak.net-earClient">
franta-hg@186
   402
			<fileset dir="${wa.copy.client.jar.from}/nekurak.net-ear" includes="**/*.*ar"/>
franta-hg@186
   403
		</copy>
franta-hg@186
   404
		<copy failonerror="false" flatten="false" todir="${dist.dir}/nekurak.net-earClient">
franta-hg@186
   405
			<fileset dir="${dist.dir}/gfdeploy/nekurak.net-ear" includes="**/*.jar"/>
franta-hg@186
   406
		</copy>
franta-hg@186
   407
	</target>
franta-hg@186
   408
	<target depends="init" name="-init-run-macros">
franta-hg@186
   409
		<macrodef name="run-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
franta-hg@186
   410
			<attribute name="subprojectname"/>
franta-hg@186
   411
			<attribute default="${application.args.param}" name="args"/>
franta-hg@186
   412
			<element name="customize" optional="true"/>
franta-hg@186
   413
			<sequential>
franta-hg@186
   414
				<java dir="${basedir}" fork="true" jar="${client.jar}">
franta-hg@186
   415
					<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@186
   416
					<jvmarg line="${j2ee.appclient.tool.jvmoptions}${client.jar},arg=-name,arg=@{subprojectname}"/>
franta-hg@186
   417
					<jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
franta-hg@186
   418
					<arg line="@{args}"/>
franta-hg@186
   419
					<syspropertyset>
franta-hg@186
   420
						<propertyref prefix="run-sys-prop."/>
franta-hg@186
   421
						<mapper from="run-sys-prop.*" to="*" type="glob"/>
franta-hg@186
   422
					</syspropertyset>
franta-hg@186
   423
					<customize/>
franta-hg@186
   424
				</java>
franta-hg@186
   425
			</sequential>
franta-hg@186
   426
		</macrodef>
franta-hg@186
   427
		<macrodef name="run-appclient-pregfv3" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
franta-hg@186
   428
			<element name="customize" optional="true"/>
franta-hg@186
   429
			<sequential>
franta-hg@186
   430
				<java classname="${j2ee.appclient.tool.mainclass}" fork="true">
franta-hg@186
   431
					<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
franta-hg@186
   432
					<jvmarg line="${j2ee.appclient.tool.jvmoptions}"/>
franta-hg@186
   433
					<jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
franta-hg@186
   434
					<arg line="${j2ee.appclient.tool.args}"/>
franta-hg@186
   435
					<arg line="-client ${client.jar}"/>
franta-hg@186
   436
					<arg line="${j2ee.appclient.mainclass.tool.param}"/>
franta-hg@186
   437
					<arg line="${application.args.param}"/>
franta-hg@186
   438
					<classpath>
franta-hg@186
   439
						<path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
franta-hg@186
   440
					</classpath>
franta-hg@186
   441
					<syspropertyset>
franta-hg@186
   442
						<propertyref prefix="run-sys-prop."/>
franta-hg@186
   443
						<mapper from="run-sys-prop.*" to="*" type="glob"/>
franta-hg@186
   444
					</syspropertyset>
franta-hg@186
   445
					<customize/>
franta-hg@186
   446
				</java>
franta-hg@186
   447
			</sequential>
franta-hg@186
   448
		</macrodef>
franta-hg@186
   449
	</target>
franta-hg@27
   450
    <!--
franta-hg@27
   451
    DEBUGGING SECTION
franta-hg@27
   452
    -->
franta-hg@186
   453
	<target depends="run-debug,run-debug-appclient" description="Deploy to server." name="debug"/>
franta-hg@186
   454
	<target depends="dist" description="Debug project in IDE." if="netbeans.home" name="run-debug" unless="app.client">
franta-hg@186
   455
		<nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="true"/>
franta-hg@186
   456
		<antcall target="connect-debugger"/>
franta-hg@186
   457
		<antcall target="debug-display-browser"/>
franta-hg@186
   458
	</target>
franta-hg@186
   459
	<target name="connect-debugger" unless="is.debugged">
franta-hg@186
   460
		<nbjpdaconnect address="${jpda.address}" host="${jpda.host}" name="${jpda.host}:${jpda.address}" transport="${jpda.transport}">
franta-hg@186
   461
			<classpath>
franta-hg@186
   462
				<path path="${debug.classpath}"/>
franta-hg@186
   463
				<fileset dir="${build.dir}" includes="lib/*.jar"/>
franta-hg@186
   464
			</classpath>
franta-hg@186
   465
			<sourcepath>
franta-hg@186
   466
				<path path="${ear.docbase.dirs}"/>
franta-hg@186
   467
			</sourcepath>
franta-hg@186
   468
		</nbjpdaconnect>
franta-hg@186
   469
	</target>
franta-hg@186
   470
	<target if="do.display.browser" name="debug-display-browser">
franta-hg@186
   471
		<nbbrowse url="${client.url}"/>
franta-hg@186
   472
	</target>
franta-hg@186
   473
	<target if="can.debug.appclient" name="run-debug-appclient">
franta-hg@186
   474
		<antcall target="-run-debug-appclient"/>
franta-hg@186
   475
	</target>
franta-hg@186
   476
	<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
   477
	<target name="-init-debug-args">
franta-hg@186
   478
		<property name="version-output" value="java version &quot;${ant.java.version}"/>
franta-hg@186
   479
		<condition property="have-jdk-older-than-1.4">
franta-hg@186
   480
			<or>
franta-hg@186
   481
				<contains string="${version-output}" substring="java version &quot;1.0"/>
franta-hg@186
   482
				<contains string="${version-output}" substring="java version &quot;1.1"/>
franta-hg@186
   483
				<contains string="${version-output}" substring="java version &quot;1.2"/>
franta-hg@186
   484
				<contains string="${version-output}" substring="java version &quot;1.3"/>
franta-hg@186
   485
			</or>
franta-hg@186
   486
		</condition>
franta-hg@186
   487
		<condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
franta-hg@186
   488
			<istrue value="${have-jdk-older-than-1.4}"/>
franta-hg@186
   489
		</condition>
franta-hg@186
   490
	</target>
franta-hg@186
   491
	<target depends="init,-init-debug-args,-as-retrieve-option-workaround,-init-run-macros" name="-init-debug-macros">
franta-hg@186
   492
		<condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
franta-hg@186
   493
			<os family="windows"/>
franta-hg@186
   494
		</condition>
franta-hg@186
   495
		<condition else="${debug-transport-by-os}" property="debug-transport-appclient" value="${debug.transport}">
franta-hg@186
   496
			<isset property="debug.transport"/>
franta-hg@186
   497
		</condition>
franta-hg@186
   498
		<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
franta-hg@186
   499
			<attribute default="${main.class}" name="name"/>
franta-hg@186
   500
			<attribute default="${debug.classpath}" name="classpath"/>
franta-hg@186
   501
			<attribute default="" name="stopclassname"/>
franta-hg@186
   502
			<sequential>
franta-hg@186
   503
				<nbjpdastart addressproperty="jpda.address.appclient" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport-appclient}">
franta-hg@186
   504
					<classpath>
franta-hg@186
   505
						<path path="@{classpath}"/>
franta-hg@186
   506
					</classpath>
franta-hg@186
   507
				</nbjpdastart>
franta-hg@186
   508
			</sequential>
franta-hg@186
   509
		</macrodef>
franta-hg@186
   510
		<macrodef name="debug-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
franta-hg@186
   511
			<attribute name="subprojectname"/>
franta-hg@186
   512
			<sequential>
franta-hg@186
   513
				<ear2:run-appclient subprojectname="@{subprojectname}">
franta-hg@186
   514
					<customize>
franta-hg@186
   515
						<jvmarg value="-Xrunjdwp:transport=${debug-transport-appclient},address=${jpda.address.appclient}"/>
franta-hg@186
   516
						<jvmarg line="${debug-args-line}"/>
franta-hg@186
   517
					</customize>
franta-hg@186
   518
				</ear2:run-appclient>
franta-hg@186
   519
			</sequential>
franta-hg@186
   520
		</macrodef>
franta-hg@186
   521
		<macrodef name="debug-appclient-pregfv3" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
franta-hg@186
   522
			<sequential>
franta-hg@186
   523
				<ear2:run-appclient-pregfv3>
franta-hg@186
   524
					<customize>
franta-hg@186
   525
						<jvmarg value="-Xrunjdwp:transport=${debug-transport-appclient},address=${jpda.address.appclient}"/>
franta-hg@186
   526
						<jvmarg line="${debug-args-line}"/>
franta-hg@186
   527
					</customize>
franta-hg@186
   528
				</ear2:run-appclient-pregfv3>
franta-hg@186
   529
			</sequential>
franta-hg@186
   530
		</macrodef>
franta-hg@186
   531
	</target>
franta-hg@186
   532
	<target name="-debug-appclient-deploy">
franta-hg@186
   533
		<nbstartserver debugmode="true"/>
franta-hg@186
   534
		<nbdeploy clientModuleUri="${client.module.uri}" clientUrlPart="${client.urlPart}" debugmode="true"/>
franta-hg@186
   535
	</target>
franta-hg@186
   536
	<target name="-debug-appclient-start-nbjpda">
franta-hg@186
   537
		<ear2:nbjpdastart classpath="" name="${app.client}"/>
franta-hg@186
   538
	</target>
franta-hg@186
   539
	<target if="j2ee.appclient.tool.args" name="-debug-appclient-pregfv3">
franta-hg@186
   540
		<ear2:debug-appclient-pregfv3/>
franta-hg@186
   541
	</target>
franta-hg@186
   542
	<target name="-debug-appclient" unless="j2ee.appclient.tool.args">
franta-hg@186
   543
		<ear2:debug-appclient subprojectname="${app.client}"/>
franta-hg@186
   544
	</target>
franta-hg@186
   545
    <!--
franta-hg@186
   546
    =================
franta-hg@186
   547
    PROFILING SECTION
franta-hg@186
   548
    =================
franta-hg@186
   549
    -->
franta-hg@186
   550
	<target description="Profile a J2EE project in the IDE." name="profile">
franta-hg@186
   551
		<condition else="start-profiled-server" property="profiler.startserver.target" value="start-profiled-server-extraargs">
franta-hg@186
   552
			<isset property="profiler.info.jvmargs.extra"/>
franta-hg@186
   553
		</condition>
franta-hg@186
   554
		<antcall target="${profiler.startserver.target}"/>
franta-hg@186
   555
		<antcall target="run"/>
franta-hg@186
   556
		<antcall target="start-loadgen"/>
franta-hg@186
   557
	</target>
franta-hg@186
   558
	<target name="start-profiled-server">
franta-hg@186
   559
		<nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
franta-hg@186
   560
			<jvmarg value="${profiler.info.jvmargs.agent}"/>
franta-hg@186
   561
			<jvmarg value="${profiler.j2ee.agentID}"/>
franta-hg@186
   562
		</nbstartprofiledserver>
franta-hg@186
   563
	</target>
franta-hg@186
   564
	<target name="start-profiled-server-extraargs">
franta-hg@186
   565
		<nbstartprofiledserver forceRestart="${profiler.j2ee.serverForceRestart}" javaPlatform="${profiler.info.javaPlatform}" startupTimeout="${profiler.j2ee.serverStartupTimeout}">
franta-hg@186
   566
			<jvmarg value="${profiler.info.jvmargs.extra}"/>
franta-hg@186
   567
			<jvmarg value="${profiler.info.jvmargs.agent}"/>
franta-hg@186
   568
			<jvmarg value="${profiler.j2ee.agentID}"/>
franta-hg@186
   569
		</nbstartprofiledserver>
franta-hg@186
   570
	</target>
franta-hg@186
   571
	<target if="profiler.loadgen.path" name="start-loadgen">
franta-hg@186
   572
		<loadgenstart path="${profiler.loadgen.path}"/>
franta-hg@186
   573
	</target>
franta-hg@27
   574
    <!--
franta-hg@27
   575
    CLEANUP SECTION
franta-hg@27
   576
    -->
franta-hg@186
   577
	<target depends="init" name="deps-clean" unless="no.deps">
franta-hg@186
   578
		<condition property="build.deploy.on.save" value="false">
franta-hg@186
   579
			<not>
franta-hg@186
   580
				<isset property="build.deploy.on.save"/>
franta-hg@186
   581
			</not>
franta-hg@186
   582
		</condition>
franta-hg@186
   583
		<ant antfile="${project.nekurak_net-ejb}/build.xml" inheritall="false" target="clean-ear">
franta-hg@186
   584
			<property location="${build.dir}" name="dist.ear.dir"/>
franta-hg@186
   585
			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
franta-hg@186
   586
		</ant>
franta-hg@186
   587
		<condition property="build.deploy.on.save" value="false">
franta-hg@186
   588
			<not>
franta-hg@186
   589
				<isset property="build.deploy.on.save"/>
franta-hg@186
   590
			</not>
franta-hg@186
   591
		</condition>
franta-hg@186
   592
		<ant antfile="${project.nekurak_net-rest}/build.xml" inheritall="false" target="clean-ear">
franta-hg@186
   593
			<property location="${build.dir}" name="dist.ear.dir"/>
franta-hg@186
   594
			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
franta-hg@186
   595
		</ant>
franta-hg@186
   596
		<condition property="build.deploy.on.save" value="false">
franta-hg@186
   597
			<not>
franta-hg@186
   598
				<isset property="build.deploy.on.save"/>
franta-hg@186
   599
			</not>
franta-hg@186
   600
		</condition>
franta-hg@186
   601
		<ant antfile="${project.nekurak_net-web}/build.xml" inheritall="false" target="clean-ear">
franta-hg@186
   602
			<property location="${build.dir}" name="dist.ear.dir"/>
franta-hg@186
   603
			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
franta-hg@186
   604
		</ant>
franta-hg@186
   605
		<condition property="build.deploy.on.save" value="false">
franta-hg@186
   606
			<not>
franta-hg@186
   607
				<isset property="build.deploy.on.save"/>
franta-hg@186
   608
			</not>
franta-hg@186
   609
		</condition>
franta-hg@186
   610
		<ant antfile="${project.nekurak_net-ws}/build.xml" inheritall="false" target="clean-ear">
franta-hg@186
   611
			<property location="${build.dir}" name="dist.ear.dir"/>
franta-hg@186
   612
			<property name="deploy.on.save" value="${build.deploy.on.save}"/>
franta-hg@186
   613
		</ant>
franta-hg@186
   614
	</target>
franta-hg@186
   615
	<target depends="init" name="do-clean">
franta-hg@186
   616
		<delete dir="${build.dir}"/>
franta-hg@186
   617
		<delete dir="${dist.dir}"/>
franta-hg@186
   618
		<delete dir="${build.dir}"/>
franta-hg@186
   619
	</target>
franta-hg@186
   620
	<target depends="init" if="netbeans.home" name="undeploy-clean">
franta-hg@186
   621
		<nbundeploy failOnError="false" startServer="false"/>
franta-hg@186
   622
	</target>
franta-hg@186
   623
	<target name="post-clean">
franta-hg@27
   624
        <!-- Empty placeholder for easier customization. -->
franta-hg@27
   625
        <!-- You can override this target in the ../build.xml file. -->
franta-hg@186
   626
	</target>
franta-hg@186
   627
	<target depends="init,undeploy-clean,deps-clean,do-clean,post-clean" description="Clean build products." name="clean"/>
franta-hg@27
   628
</project>