File: build-impl.xml

package info (click to toggle)
libnb-platform18-java 7.4%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 81,288 kB
  • ctags: 101,418
  • sloc: java: 682,018; xml: 117,409; ansic: 6,281; sh: 3,982; cpp: 2,458; objc: 288; perl: 276; makefile: 252
file content (365 lines) | stat: -rw-r--r-- 18,096 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<?xml version="1.0" encoding="UTF-8"?>
<!--
*** GENERATED FROM project.xml - DO NOT EDIT  ***
***         EDIT ../build.xml INSTEAD         ***

For the purpose of easier reading the script
is divided into following sections:

  - initialization
  - compilation
  - dist
  - execution
  - debugging
  - cleanup

-->
<project name="NBI_Server-impl" default="build" basedir=".." xmlns:ear2="http://www.netbeans.org/ns/j2ee-earproject/2">
    <import file="ant-deploy.xml"/>
    <target name="default" depends="dist" description="Build whole project."/>
    <!-- 
    INITIALIZATION SECTION 
    -->
    <target name="pre-init">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="init-private" depends="pre-init">
        <property file="nbproject/private/private.properties"/>
    </target>
    <target name="init-userdir" depends="pre-init,init-private">
        <property name="user.properties.file" location="${netbeans.user}/build.properties"/>
    </target>
    <target name="init-user" depends="pre-init,init-private,init-userdir">
        <property file="${user.properties.file}"/>
    </target>
    <target name="init-project" depends="pre-init,init-private,init-userdir,init-user">
        <property file="nbproject/project.properties"/>
    </target>
    <target name="do-init" depends="pre-init,init-private,init-userdir,init-user,init-project">
        <!-- The two properties below are usually overridden -->
        <!-- by the active platform. Just a fallback. -->
        <property name="default.javac.source" value="1.4"/>
        <property name="default.javac.target" value="1.4"/>
        <condition property="do.compile.jsps">
            <istrue value="${compile.jsps}"/>
        </condition>
        <condition property="do.display.browser">
            <and>
                <istrue value="${display.browser}"/>
                <contains string="${client.module.uri}" substring=".war"/>
            </and>
        </condition>
        <available property="has.custom.manifest" file="${meta.inf}/MANIFEST.MF"/>
        <condition property="j2ee.appclient.mainclass.tool.param" value="-mainclass ${main.class}" else="">
            <and>
                <isset property="main.class"/>
                <not>
                    <equals arg1="${main.class}" arg2="" trim="true"/>
                </not>
            </and>
        </condition>
        <condition property="j2ee.appclient.jvmoptions.param" value="${j2ee.appclient.jvmoptions}" else="">
            <and>
                <isset property="j2ee.appclient.jvmoptions"/>
                <not>
                    <equals arg1="${j2ee.appclient.jvmoptions}" arg2="" trim="true"/>
                </not>
            </and>
        </condition>
        <condition property="application.args.param" value="${application.args}" else="">
            <and>
                <isset property="application.args"/>
                <not>
                    <equals arg1="${application.args}" arg2="" trim="true"/>
                </not>
            </and>
        </condition>
        <condition property="can.debug.appclient">
            <and>
                <isset property="netbeans.home"/>
                <isset property="app.client"/>
            </and>
        </condition>
    </target>
    <target name="post-init">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="init-check" depends="pre-init,init-private,init-userdir,init-user,init-project,do-init">
        <fail unless="build.dir">Must set build.dir</fail>
        <fail unless="build.generated.dir">Must set build.generated.dir</fail>
        <fail unless="dist.dir">Must set dist.dir</fail>
        <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
        <fail unless="dist.jar">Must set dist.jar</fail>
    </target>
    <target name="init" depends="pre-init,init-private,init-userdir,init-user,init-project,do-init,post-init,init-check"/>
    <!--
    COMPILATION SECTION
    -->
    <target name="deps-jar" depends="init" unless="no.deps"/>
    <target name="deps-j2ee-archive" depends="init" unless="no.deps">
        <ant target="dist-ear" inheritall="false" antfile="${project.NBI_Server_-_Admin}/build.xml">
            <property name="dist.ear.dir" location="${build.dir}"/>
        </ant>
        <ant target="dist-ear" inheritall="false" antfile="${project.NBI_Server_-_Client}/build.xml">
            <property name="dist.ear.dir" location="${build.dir}"/>
        </ant>
        <ant target="dist-ear" inheritall="false" antfile="${project.NBI_Server_-_EJB}/build.xml">
            <property name="dist.ear.dir" location="${build.dir}"/>
        </ant>
    </target>
    <target name="pre-pre-compile" depends="init,deps-jar,deps-j2ee-archive"/>
    <target name="pre-compile">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="do-compile" depends="init,deps-jar,pre-pre-compile,pre-compile">
        <copy todir="${build.dir}/META-INF">
            <fileset dir="${meta.inf}"/>
        </copy>
        <copy file="${reference.NBI_Server_-_EJB.dist-ear}" todir="${build.dir}//"/>
        <copy file="${reference.NBI_Server_-_Admin.dist-ear}" todir="${build.dir}//"/>
        <copy file="${reference.NBI_Server_-_Client.dist-ear}" todir="${build.dir}//"/>
    </target>
    <target name="post-compile">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="compile" depends="init,deps-jar,pre-pre-compile,pre-compile,do-compile,post-compile" description="Compile project."/>
    <!--
    DIST BUILDING SECTION
    -->
    <target name="pre-dist">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="do-dist-without-manifest" depends="init,compile,pre-dist" unless="has.custom.manifest">
        <dirname property="dist.jar.dir" file="${dist.jar}"/>
        <mkdir dir="${dist.jar.dir}"/>
        <jar jarfile="${dist.jar}" compress="${jar.compress}">
            <fileset dir="${build.dir}"/>
        </jar>
    </target>
    <target name="do-dist-with-manifest" depends="init,compile,pre-dist" if="has.custom.manifest">
        <dirname property="dist.jar.dir" file="${dist.jar}"/>
        <mkdir dir="${dist.jar.dir}"/>
        <jar jarfile="${dist.jar}" compress="${jar.compress}" manifest="${meta.inf}/MANIFEST.MF">
            <fileset dir="${build.dir}"/>
        </jar>
    </target>
    <target name="post-dist">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="dist" depends="init,compile,pre-dist,do-dist-without-manifest,do-dist-with-manifest,post-dist" description="Build distribution (JAR)."/>
    <!--
    EXECUTION SECTION
    -->
    <target name="run" depends="run-deploy,run-display-browser,run-ac" description="Deploy to server."/>
    <target name="pre-run-deploy">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="post-run-deploy">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="-pre-nbmodule-run-deploy">
        <!-- Empty placeholder for easier customization. -->
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -pre-run-deploy task instead. -->
    </target>
    <target name="-post-nbmodule-run-deploy">
        <!-- Empty placeholder for easier customization. -->
        <!-- This target can be overriden by NetBeans modules. Don't override it directly, use -post-run-deploy task instead. -->
    </target>
    <target name="-run-deploy-am" unless="no.deps">
        <!-- Task to deploy to the Access Manager runtime. -->
        <ant target="-run-deploy-am" inheritall="false" antfile="${project.NBI_Server_-_Admin}/build.xml"/>
        <ant target="-run-deploy-am" inheritall="false" antfile="${project.NBI_Server_-_Client}/build.xml"/>
        <ant target="-run-deploy-am" inheritall="false" antfile="${project.NBI_Server_-_EJB}/build.xml"/>
    </target>
    <target name="run-deploy" depends="dist,pre-run-deploy,-pre-nbmodule-run-deploy,-run-deploy-nb,-init-deploy-ant,-deploy-ant,-run-deploy-am,-post-nbmodule-run-deploy,post-run-deploy"/>
    <target name="-run-deploy-nb" if="netbeans.home">
        <nbdeploy debugmode="false" forceRedeploy="${forceRedeploy}" clientUrlPart="${client.urlPart}" clientModuleUri="${client.module.uri}"/>
    </target>
    <target name="-init-deploy-ant" unless="netbeans.home">
        <property name="deploy.ant.archive" value="${dist.jar}"/>
        <property name="deploy.ant.resource.dir" value="${resource.dir}"/>
        <property name="deploy.ant.enabled" value="true"/>
    </target>
    <target name="run-undeploy" depends="dist,-run-undeploy-nb,-init-deploy-ant,-undeploy-ant"/>
    <target name="-run-undeploy-nb" if="netbeans.home">
        <fail message="Undeploy is not supported from within the IDE"/>
    </target>
    <target name="verify" depends="dist">
        <nbverify file="${dist.jar}"/>
    </target>
    <target name="run-display-browser" depends="run-deploy,-init-display-browser,-display-browser-nb,-display-browser-cl"/>
    <target name="-init-display-browser" if="do.display.browser">
        <condition property="do.display.browser.nb">
            <isset property="netbeans.home"/>
        </condition>
        <condition property="do.display.browser.cl">
            <and>
                <isset property="deploy.ant.enabled"/>
                <isset property="deploy.ant.client.url"/>
            </and>
        </condition>
    </target>
    <target name="-display-browser-nb" if="do.display.browser.nb">
        <nbbrowse url="${client.url}"/>
    </target>
    <target name="-get-browser" if="do.display.browser.cl" unless="browser">
        <condition property="browser" value="rundll32">
            <os family="windows"/>
        </condition>
        <condition property="browser.args" value="url.dll,FileProtocolHandler" else="">
            <os family="windows"/>
        </condition>
        <condition property="browser" value="/usr/bin/open">
            <os family="mac"/>
        </condition>
        <property environment="env"/>
        <condition property="browser" value="${env.BROWSER}">
            <isset property="env.BROWSER"/>
        </condition>
        <condition property="browser" value="/usr/bin/firefox">
            <available file="/usr/bin/firefox"/>
        </condition>
        <condition property="browser" value="/usr/local/firefox/firefox">
            <available file="/usr/local/firefox/firefox"/>
        </condition>
        <condition property="browser" value="/usr/bin/mozilla">
            <available file="/usr/bin/mozilla"/>
        </condition>
        <condition property="browser" value="/usr/local/mozilla/mozilla">
            <available file="/usr/local/mozilla/mozilla"/>
        </condition>
        <condition property="browser" value="/usr/sfw/lib/firefox/firefox">
            <available file="/usr/sfw/lib/firefox/firefox"/>
        </condition>
        <condition property="browser" value="/opt/csw/bin/firefox">
            <available file="/opt/csw/bin/firefox"/>
        </condition>
        <condition property="browser" value="/usr/sfw/lib/mozilla/mozilla">
            <available file="/usr/sfw/lib/mozilla/mozilla"/>
        </condition>
        <condition property="browser" value="/opt/csw/bin/mozilla">
            <available file="/opt/csw/bin/mozilla"/>
        </condition>
    </target>
    <target name="-display-browser-cl" depends="-get-browser" if="do.display.browser.cl">
        <fail unless="browser">
            Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable.
        </fail>
        <property name="browse.url" value="${deploy.ant.client.url}${client.urlPart}"/>
        <echo>Launching ${browse.url}</echo>
        <exec executable="${browser}" spawn="true">
            <arg line="${browser.args} ${browse.url}"/>
        </exec>
    </target>
    <target name="run-ac" depends="init" if="app.client">
        <antcall target="run-${app.client}"/>
    </target>
    <target name="-as-retrieve-option-workaround" if="j2ee.appclient.mainclass.args" unless="j2ee.clientName">
        <property name="client.jar" value="${dist.dir}/NBI ServerClient.jar"/>
        <sleep seconds="3"/>
        <copy file="${wa.copy.client.jar.from}/NBI Server/NBI ServerClient.jar" todir="${dist.dir}"/>
    </target>
    <!--
    DEBUGGING SECTION
    -->
    <target name="debug" depends="run-debug,run-display-browser,run-debug-appclient" description="Deploy to server."/>
    <target name="run-debug" description="Debug project in IDE." depends="dist" if="netbeans.home" unless="app.client">
        <nbdeploy debugmode="true" clientUrlPart="${client.urlPart}" clientModuleUri="${client.module.uri}"/>
        <antcall target="connect-debugger"/>
    </target>
    <target name="connect-debugger" unless="is.debugged">
        <nbjpdaconnect name="${name}" host="${jpda.host}" address="${jpda.address}" transport="${jpda.transport}">
            <classpath>
                <path path="${debug.classpath}"/>
            </classpath>
            <sourcepath>
                <path path="${ear.docbase.dirs}"/>
            </sourcepath>
        </nbjpdaconnect>
    </target>
    <target name="-init-debug-args">
        <property name="version-output" value="java version &quot;${ant.java.version}"/>
        <condition property="have-jdk-older-than-1.4">
            <or>
                <contains string="${version-output}" substring="java version &quot;1.0"/>
                <contains string="${version-output}" substring="java version &quot;1.1"/>
                <contains string="${version-output}" substring="java version &quot;1.2"/>
                <contains string="${version-output}" substring="java version &quot;1.3"/>
            </or>
        </condition>
        <condition property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none" else="-Xdebug">
            <istrue value="${have-jdk-older-than-1.4}"/>
        </condition>
    </target>
    <target name="run-debug-appclient" depends="init,-init-debug-args" if="can.debug.appclient">
        <macrodef name="debug-appclient" uri="http://www.netbeans.org/ns/j2ee-earproject/2">
            <attribute name="mainclass"/>
            <attribute name="classpath" default="${debug.classpath}"/>
            <element name="customize" optional="true"/>
            <attribute name="args" default="${application.args.param}"/>
            <sequential>
                <parallel>
                    <java fork="true" classname="@{mainclass}">
                        <jvmarg line="${j2ee.appclient.tool.jvmoptions}"/>
                        <jvmarg line="${debug-args-line}"/>
                        <jvmarg value="-Xrunjdwp:transport=${jpda.transport},server=y,address=${jpda.address},suspend=y"/>
                        <jvmarg line="${j2ee.appclient.jvmoptions.param}"/>
                        <arg line="@{args}"/>
                        <classpath>
                            <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
                            <path path="@{classpath}"/>
                        </classpath>
                        <syspropertyset>
                            <propertyref prefix="run-sys-prop."/>
                            <mapper type="glob" from="run-sys-prop.*" to="*"/>
                        </syspropertyset>
                        <customize/>
                    </java>
                    <nbjpdaconnect name="${name}" host="${jpda.host}" address="${jpda.address}" transport="${jpda.transport}">
                        <classpath>
                            <path path="${j2ee.platform.classpath}:${j2ee.appclient.tool.runtime}"/>
                            <path path="@{classpath}"/>
                        </classpath>
                        <sourcepath>
                            <path path="${src.dir}"/>
                        </sourcepath>
                    </nbjpdaconnect>
                </parallel>
            </sequential>
        </macrodef>
        <nbdeploy debugmode="false" clientUrlPart="${client.urlPart}" clientModuleUri="${client.module.uri}"/>
        <antcall target="debug-${app.client}"/>
    </target>
    <!--
    CLEANUP SECTION
    -->
    <target name="deps-clean" depends="init" unless="no.deps">
        <ant target="clean-ear" inheritall="false" antfile="${project.NBI_Server_-_Admin}/build.xml">
            <property name="dist.ear.dir" location="${build.dir}"/>
        </ant>
        <ant target="clean-ear" inheritall="false" antfile="${project.NBI_Server_-_Client}/build.xml">
            <property name="dist.ear.dir" location="${build.dir}"/>
        </ant>
        <ant target="clean-ear" inheritall="false" antfile="${project.NBI_Server_-_EJB}/build.xml">
            <property name="dist.ear.dir" location="${build.dir}"/>
        </ant>
    </target>
    <target name="do-clean" depends="init">
        <delete dir="${build.dir}"/>
        <delete dir="${dist.dir}"/>
        <delete dir="${build.dir}"/>
    </target>
    <target name="post-clean">
        <!-- Empty placeholder for easier customization. -->
        <!-- You can override this target in the ../build.xml file. -->
    </target>
    <target name="clean" depends="init,deps-clean,do-clean,post-clean" description="Clean build products."/>
</project>