-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathbuild.xml
More file actions
752 lines (669 loc) · 32.1 KB
/
build.xml
File metadata and controls
752 lines (669 loc) · 32.1 KB
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
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
<?xml version="1.0" encoding="UTF-8"?>
<project name="services.standard.build" default="main">
<import file="scripts/build.filelayout.xml"/>
<import file="scripts/build.java.xml"/>
<import file="scripts/build.config.xml"/>
<import file="scripts/build.dev.xml"/>
<!-- Compiler options -->
<property name="compiler.debug" value="on"/>
<property name="compiler.generate.no.warnings" value="off"/>
<property name="compiler.args" value=""/>
<property name="compiler.max.memory" value="128m"/>
<!-- Check whether the IIQ version is earlier than 6.3 or 6.4
so that we can exclude certain components from compilation
if they are not compatible with earlier versions -->
<script language="javascript">
<![CDATA[
var version = parseFloat(project.getProperty('IIQVersion'));
project.setProperty('pre6.2', version < 6.2);
project.setProperty('pre6.3', version < 6.3);
project.setProperty('pre6.4', version < 6.4);
project.setProperty('pre7.0', version < 7.0);
project.setProperty('pre7.1', version < 7.1);
]]>
</script>
<patternset id="ignored.files">
<exclude name="**/CVS/**"/>
<exclude name="**/SCCS/**"/>
<exclude name="**/RCS/**"/>
<exclude name="**/rcs/**"/>
<exclude name="**/.DS_Store/**"/>
<exclude name="**/.svn/**"/>
<exclude name="**/.pyc/**"/>
<exclude name="**/.pyo/**"/>
<exclude name="**/*.pyc/**"/>
<exclude name="**/*.pyo/**"/>
<exclude name="**/.git/**"/>
<exclude name="**/*.hprof/**"/>
<exclude name="**/_svn/**"/>
<exclude name="**/.hg/**"/>
<exclude name="**/*.lib/**"/>
<exclude name="**/*~/**"/>
</patternset>
<patternset id="library.patterns">
<include name="*.zip"/>
<include name="*.war"/>
<include name="*.egg"/>
<include name="*.ear"/>
<include name="*.swc"/>
<include name="*.jar"/>
</patternset>
<patternset id="compiler.resources">
<include name="**/?*.properties"/>
<include name="**/?*.xml"/>
<include name="**/?*.gif"/>
<include name="**/?*.png"/>
<include name="**/?*.jpeg"/>
<include name="**/?*.jpg"/>
<include name="**/?*.html"/>
<include name="**/?*.dtd"/>
<include name="**/?*.tld"/>
<include name="**/?*.ftl"/>
</patternset>
<!-- JDK definitions -->
<property name="jdk.bin.1.6" value="${jdk.home.1.6}/bin"/>
<path id="jdk.classpath.1.6">
<fileset dir="${jdk.home.1.6}">
<include name="jre/lib/alt-rt.jar"/>
<include name="jre/lib/alt-string.jar"/>
<include name="jre/lib/charsets.jar"/>
<include name="jre/lib/deploy.jar"/>
<include name="jre/lib/javaws.jar"/>
<include name="jre/lib/jce.jar"/>
<include name="jre/lib/jsse.jar"/>
<include name="jre/lib/management-agent.jar"/>
<include name="jre/lib/plugin.jar"/>
<include name="jre/lib/resources.jar"/>
<include name="jre/lib/rt.jar"/>
<include name="jre/lib/ext/dnsns.jar"/>
<include name="jre/lib/ext/localedata.jar"/>
<include name="jre/lib/ext/sunjce_provider.jar"/>
<include name="jre/lib/ext/sunmscapi.jar"/>
<include name="jre/lib/ext/sunpkcs11.jar"/>
</fileset>
</path>
<!-- ********************************************************* -->
<!-- Global properties -->
<!-- ********************************************************* -->
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="lib/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<taskdef name="build-init" classname="sailpoint.services.tools.ant.BuildInitTask">
<classpath>
<pathelement location="lib/services-tools.jar"/>
</classpath>
</taskdef>
<typedef name="gt" classname="sailpoint.services.tools.ant.ConditionGreaterThan">
<classpath>
<pathelement location="lib/services-tools.jar"/>
</classpath>
</typedef>
<taskdef name="grep" classname="ise.antelope.tasks.Find">
<classpath>
<pathelement location="lib/AntelopeTasks_3.5.3.jar"/>
</classpath>
</taskdef>
<taskdef name="unset" classname="ise.antelope.tasks.Unset">
<classpath>
<pathelement location="lib/AntelopeTasks_3.5.3.jar"/>
</classpath>
</taskdef>
<taskdef name="verifyNamingConvention" classname="sailpoint.services.tools.ant.VerifyFileNamingConvention">
<classpath>
<fileset dir="lib">
<include name="services-tools.jar"/>
<include name="catalina-ant.jar"/>
</fileset>
</classpath>
</taskdef>
<taskdef name="getIIQObjectName" classname="sailpoint.services.tools.ant.getIIQObjectName">
<classpath>
<fileset dir="lib">
<include name="services-tools.jar"/>
</fileset>
</classpath>
</taskdef>
<!-- ********************************************************* -->
<!-- Global properties -->
<!-- ********************************************************* -->
<!-- Eclipse -->
<property name="build" location="build"/>
<property name="build.iiqBinaryExtract" location="${build}/extract"/>
<target name="init-properties">
<!-- Allows you to essentially dereference a property -->
<macrodef name="propertycopy">
<attribute name="name"/>
<attribute name="from"/>
<sequential>
<property name="@{name}" value="${@{from}}"/>
</sequential>
</macrodef>
<!-- The build.properties is loaded further below, after the host
name is derived. This allows per-hostname over-ride of the
build.properties file.
<property file="build.properties"/>
-->
<!-- list of servers and associated build environments -->
<property file="servers.properties"/>
<property environment="env"/>
<!-- get hostname or computername, depending upon OS -->
<condition property="hostname" value="${env.HOSTNAME}">
<os family="unix"/>
</condition>
<condition property="hostname" value="${env.COMPUTERNAME}">
<os family="windows"/>
</condition>
<condition property="hostname" value="${env.HOSTNAME}">
<os family="mac"/>
</condition>
<echo>hostname pulled from OS = ${hostname}</echo>
<!-- look for _hostname_.build.properties ... if found it overrides build.properties-->
<echo message="Looking for local properties file ${hostname}.build.properties"/>
<if>
<available file="${hostname}.build.properties"/>
<then>
<property file="${hostname}.build.properties"/>
<echo message="local properties file = ${hostname}.build.properties"/>
</then>
<else>
<echo>No local properties file for ${hostname}.build.properties</echo>
<echo message="Looking for local properties file build.properties.${hostname} (legacy naming convention)"/>
<if>
<available file="build.properties.${hostname}"/>
<then>
<echo>
build.properties.${hostname} is now a deprecated naming convention.
Recommendation is to use ${hostname}.build.properties instead.
</echo>
<sleep seconds="5"/>
<property file="build.properties.${hostname}"/>
<echo message="local properties file = build.properties.${hostname}"/>
</then>
<else>
<echo>No local properties file for build.properties.${hostname}</echo>
</else>
</if>
</else>
</if>
<!-- Look for a _hostname_.target.properties file, if found it overrides BUILDTYPE.target.properties -->
<if>
<available file="${hostname}.target.properties"/>
<then>
<property file="${hostname}.target.properties"/>
<echo message="Found host-specific properties file = ${hostname}.target.properties"/>
</then>
<else>
<echo>No host-specific properties file for ${hostname}.target.properties</echo>
</else>
</if>
<!--information regarding host and discovered target -->
<echo message="host = ${hostname}"/>
<!-- Allow the end user to override the target we are building for by
defining an SPTARGET environment variable. -->
<if>
<isset property="env.SPTARGET"/>
<then>
<propertycopy name="target" from="env.SPTARGET"/>
<echo message="Found SPTARGET environment variable of ${target}, building for that environment."/>
</then>
<else>
<propertycopy name="target" from="${hostname}"/>
<echo>No SPTARGET environment variable found</echo>
</else>
</if>
<echo message="target=${target}"/>
<fail message="Unable to load target properties. Please ensure your host is set to a build target in servers.properties or that SPTARGET is set to a valid environment name.">
<condition>
<not>
<available file="${target}.target.properties"/>
</not>
</condition>
</fail>
<!-- override of os level environment attribute, often useful in dev environments-->
<!--<property name="target" value="sandbox"/>-->
<echo>Building for environment target ${target}</echo>
<if>
<!-- Test for the target property files before continuing -->
<not>
<and>
<available file="${target}.iiq.properties"/>
<available file="${target}.target.properties"/>
</and>
</not>
<then>
<fail message="Error: ${line.separator}
Can't find '${target}.iiq.properties' and '${target}.target.properties' ${line.separator}
You must define these files in the root of the build folder to build for this environment"/>
</then>
</if>
<!-- Look for a _target_.build.properties file, if found it overrides build.properties. -->
<echo>Looking for a ${target}.build.properties file...</echo>
<if>
<available file="${target}.build.properties"/>
<then>
<property file="${target}.build.properties"/>
<echo message="Environment-specific properties file = ${target}.build.properties"/>
</then>
<else>
<echo>Did not find a ${target}.build.properties file</echo>
<echo>Looking for a build.properties.${target} file instead</echo>
<if>
<available file="build.properties.${target}"/>
<then>
<echo>
build.properties.${target} is deprecated naming convention.
Recommendation is to use ${target}.build.properties for new work.
</echo>
<sleep seconds="5"/>
<property file="build.properties.${target}"/>
<echo message="Environment-specific properties file = build.properties.${target}"/>
</then>
</if>
</else>
</if>
<property file="build.properties"/>
<!-- look for environment specific files to ignore during the build. -->
<echo message="Checking for target '${target}' files to ignore..."/>
<if>
<available file="${target}.ignorefiles.properties"/>
<then>
<echo message="Found target ignore list file: '${target}.ignorefiles.properties', loading ignore list."/>
<property name="ignoreFiles" value="" />
<property name="ignorefiles.is.found" value="true"/>
<loadfile property="ignoreListFile" srcfile="${target}.ignorefiles.properties"/>
<!-- Note: we just document on the console the file contents here.
The actual redaction/removal of these files is done in the
build out of the init-custom.xml in the build.config.xml file. -->
<for param="ignoreListFileLine">
<tokens>
<file file="${target}.ignorefiles.properties" />
</tokens>
<sequential>
<var name="ignoreListFileLine.length" unset="true" />
<length string="@{ignoreListFileLine}" property="ignoreListFileLine.length" />
<if>
<or>
<!-- Assume the lines don't start with a comment. -->
<matches pattern="\s*\#.*$" string="@{ignoreListFileLine}" />
<equals arg1="${ignoreListFileLine.length}" arg2="0" />
</or>
<then>
<!-- the line is blank or a comment, skip it. -->
<!-- <echo></echo> -->
</then>
<else>
<echo>Will skip import for: @{ignoreListFileLine}</echo>
</else>
</if>
</sequential>
</for>
</then>
<else>
<echo message="No target ignore list file: '${target}.ignorefiles.properties', importing all XML objects."/>
</else>
</if>
<!-- common directories -->
<property name="build" location="build"/>
<property name="build.iiqBinaryExtract" location="${build}/extract"/>
<property name="build.customXMLDir" location="${build.iiqBinaryExtract}/WEB-INF/config/custom"/>
<property name="build.web-inf.lib" location="${build.iiqBinaryExtract}/WEB-INF/lib"/>
<property name="build.web-inf.classes" location="${build.iiqBinaryExtract}/WEB-INF/classes"/>
<!-- common files -->
<property name="dtd" location="${build.iiqBinaryExtract}/sailpoint.${IIQVersion}${IIQPatchLevel}.dtd"/>
<tstamp>
<format property="build.zipstamp" pattern="yyyyMMdd-HHmm" />
</tstamp>
</target>
<!-- ********************************************************* -->
<!-- Main -->
<!-- expands ga bin and applies customizations -->
<!-- ********************************************************* -->
<target name="main"
depends="init-properties" description="makes complete iiq distribution directory">
<!-- laydown initial binaries and custom static web content -->
<antcall inheritall="true" target="prepBinaries"/>
<!-- delete outdated MySQL, Oracle and MSSQL JDBC drivers -->
<delete file="${build.web-inf.lib}/mysql-connector-java-5.1.13-bin.jar"/>
<delete file="${build.web-inf.lib}/ojdbc14.jar"/>
<delete file="${build.web-inf.lib}/sqljdbc-1.2.jar"/>
<!--
when you drop a new JDBC driver jar into WEB-INF/lib in the SSB project folder,
you need to make sure you delete the out-of-the-box JDBC driver in the same namespace.
here's an example of deleting the old default 4.0 SQL Server JDBC driver if you add in the
4.2 JDBC driver for the same. the new jar is called sqljdbc42.jar, but you need to clean up
the old jar, as they share the same namepace within.
<delete file="${build.web-inf.lib}/sqljdbc4.jar"/>
-->
<!-- search for custom tasks to perform on the files that will be included in the web application folder -->
<if>
<equals arg1="${runCustomScripts}" arg2="true"/>
<then>
<subant target="post.expansion.hook" inheritall="true">
<fileset dir="." includes="scripts/build.custom.*.xml"/>
</subant>
</then>
</if>
<if>
<equals arg1="${runCodeChecks}" arg2="true"/>
<then>
<tstamp>
<format property="spBuildCheckTimestamp" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<subant target="sp.services.runCodeChecks" inheritall="true" failonerror="false">
<fileset dir="." includes="scripts/build.check.*.xml"/>
</subant>
</then>
</if>
<!-- compile custom java artifacts -->
<antcall inheritall="true" target="compile"/>
<antcall inheritall="true" target="-generateDTD"/>
<antcall inheritall="true" target="includeCustomJar"/>
<!-- compile custom configuration, apply env tokens and setup init files-->
<antcall inheritall="true" target="prepareCustomConfig"/>
<if>
<equals arg1="${updateLog4jLoggers}" arg2="true"/>
<then>
<antcall inheritall="true" target="log4jPropsUpdate"/>
</then>
</if>
<antcall target="cleanUpFromFailure"/>
<if>
<equals arg1="${runCodeChecks}" arg2="true"/>
<then>
<subant target="sp.services.runCodeChecks" inheritall="true" failonerror="false">
<fileset dir="." includes="scripts/build.check.postexpansion*.xml"/>
</subant>
<touch file="build/buildChecks/spBuildCheck.log" mkdirs="true"/>
<echo file="build/buildChecks/spBuildCheck.log">
****************************************************************
Build Check Report
Build Check performed at ${spBuildCheckTimestamp}
Please note some of the warnings below could be false positive
*****************************************************************
</echo>
<concat destfile="build/buildChecks/spBuildCheck.log" append="true" >
<fileset dir="build/buildChecks" includes="buildCheck*.log" />
</concat>
<delete >
<fileset dir="build/buildChecks" includes="buildCheck*.log" />
</delete>
<echo message="************************************************************************"/>
<echo message="* Build Check report generated at build/buildChecks/spBuildCheck.log *"/>
<echo message="************************************************************************"/>
</then>
</if>
</target>
<!-- ********************************************************* -->
<!-- War -->
<!-- makes war file and applies customizations -->
<!-- ********************************************************* -->
<target name="war" depends="main" description="Makes war file from main target results and applies custom post war custom scripts">
<!-- package a war file for deployment -->
<war destfile="build/deploy/identityiq.war">
<fileset dir="${build.iiqBinaryExtract}"/>
</war>
<if>
<equals arg1="${runCustomScripts}" arg2="true"/>
<then>
<subant target="post.war.hook" inheritall="true" failonerror="false">
<fileset dir="." includes="scripts/build.custom.*.xml"/>
</subant>
</then>
</if>
<checksum file="build/deploy/identityiq.war" forceOverwrite="yes"/>
<echo>A MD5 checksum was generated for this war file and placed in the war file directory. Keep this checksum to diagnose potential version issues</echo>
</target>
<!-- -->
<!-- Target: deploy -->
<!-- Move files over to the IdentityIQ side and import -->
<!-- -->
<target name="deploy" depends="war">
<echo message="Deploying build local IIQ instance: ${IIQHome}."/>
<unzip src="build/deploy/identityiq.war" dest="${IIQHome}" overwrite="true"/>
<property name="build.deployed" value="true"/>
<antcall target="import-custom"/>
</target>
<!-- -->
<!-- Target: install -->
<!-- Move files over to the IdentityIQ side -->
<!-- -->
<target name="install" depends="war">
<echo message="Deploying build local IIQ instance: ${IIQHome}."/>
<unzip src="build/deploy/identityiq.war" dest="${IIQHome}" overwrite="true"/>
<property name="build.deployed" value="true"/>
</target>
<!-- -->
<!-- Target: log4jPropsUpdate -->
<!-- Updates log4j.properties with any loggers that appear in files in custom folder -->
<!-- -->
<target name="log4jPropsUpdate">
<property name="log4jdestination" value="${build.web-inf.classes}/log4j.properties"/>
<property name="log4jbackup" value="${build.web-inf.classes}/log4j.properties.orig"/>
<property name="log4jtmp" value="${build.web-inf.classes}/log4j.properties.log4jupdate_tmp"/>
<echo message="Generating custom log4j properties file..."/>
<if>
<!-- Test for the log4j file before continuing -->
<not>
<and>
<available file="${log4jdestination}"/>
</and>
</not>
<then>
<fail message="Error: Can't find '${log4jdestination}', something went wrong... ${line.separator}"/>
</then>
</if>
<!-- File must be copied every time, due to the fact main
task is not overwriting it every time and we are concatenating
log config on every build -->
<if>
<not>
<and>
<available file="${log4jbackup}"/>
</and>
</not>
<then>
<copy file="${log4jdestination}" tofile="${log4jbackup}" overwrite="true"/>
</then>
<else>
<copy file="${log4jbackup}" tofile="${log4jdestination}" overwrite="true"/>
</else>
</if>
<echo file="${log4jdestination}" append="true">
# ===================================================================
# The lines below have been dynamically added via the build script
# ===================================================================
</echo>
<concat destfile="${log4jtmp}" append="true">
<fileset dir="${build.customXMLDir}/">
<filename name="**/*.xml"/>
</fileset>
<filterchain>
<linecontainsregexp>
<regexp pattern=".*=.*(Logger.getLogger|LogFactory.getLog)"/>
</linecontainsregexp>
<deletecharacters chars="\t"/>
<deletecharacters chars=" "/>
<tokenfilter>
<replaceregex pattern=".*=.*(Logger.getLogger|LogFactory.getLog)\s*\(\s*"" replace=""/>
<replaceregex pattern=""\s*\)\s*;" replace="=trace"/>
</tokenfilter>
<prefixlines prefix="#log4j.logger."/>
</filterchain>
</concat>
<if>
<available file="${log4jtmp}"/>
<then>
<loadfile property="loggerEntries" srcFile="${log4jtmp}"/>
<for list="${loggerEntries}" param="logLine" delimiter="${line.separator}">
<sequential>
<if>
<not>
<resourcecontains resource="${log4jdestination}" substring="@{logLine}"/>
</not>
<then>
<echo file="${log4jdestination}" append="true">
@{logLine}</echo>
</then>
</if>
</sequential>
</for>
<delete file="${log4jtmp}"/>
</then>
</if>
<property name="srcDir" location="src"/>
<for param="file">
<path>
<fileset dir="src">
<filename name="**/*.java"/>
</fileset>
</path>
<sequential>
<var name="rawClassName" unset="true"/>
<var name="className" unset="true"/>
<var name="relativePth" unset="true"/>
<pathconvert property="relativePth">
<file file="@{file}" />
<!-- pathconvert strips off the leading ${basedir}/js -->
<map from="${srcDir}" to="" />
</pathconvert>
<propertyregex property="rawClassName"
input="${relativePth}"
regexp="[\\\/]*(.*)\.java"
select="\1"
casesensitive="false" />
<propertyregex property="className"
input="${rawClassName}"
regexp="[\\\/]"
replace="."
casesensitive="false" />
<echo file="${log4jdestination}" append="true">
#log4j.logger.${className}=trace</echo>
</sequential>
</for>
</target>
<!-- -->
<!-- Target: document -->
<!-- Documents custom artifacts in config folder -->
<!-- -->
<target name="document" depends="main">
<echo message="Generating custom implementation documentation..."/>
<property name="docs.src" value="${build.customXMLDir}"/>
<property name="docs.dest" value="${build}/doc/TechnicalConfig"/>
<echo message="Src: ${docs.src}"/>
<echo message="Dst: ${docs.dest}"/>
<if>
<!-- Test for the document folder before continuing -->
<not>
<and>
<available file="${docs.dest}"/>
</and>
</not>
<then>
<echo message="Creating docs destination '${docs.dest}'"/>
<mkdir dir="${docs.dest}"/>
</then>
<else>
<echo message="Docs destination '${docs.dest}' already present."/>
</else>
</if>
<java classname="sailpoint.services.tools.docgen.DocumentGeneratorCL" fork="yes">
<arg value="${docs.src}"/>
<arg value="${docs.dest}"/>
<classpath>
<pathelement location="lib/services-tools.jar"/>
<pathelement location="lib/commons-lang-2.6.jar"/>
</classpath>
</java>
<echo message="Done creating docs in '${docs.dest}'. See index.html in that location."/>
</target>
<!-- ********************************************************* -->
<!-- CleanUpFromFailure -->
<!-- Catch all clean up task for detected failures.
Any target that can leave the build in a bad state on error should
set the "critical.failure" property with an appropriate error
message and clean up its artifacts. -->
<!-- ********************************************************* -->
<!-- -->
<target name="cleanUpFromFailure" if="critical.failure">
<antcall target="clean"/>
<fail message="${critical.failure}"/>
</target>
<target name="clean" depends="init-properties">
<!-- search for custom clean tasks -->
<if>
<equals arg1="${runCustomScripts}" arg2="true"/>
<then>
<subant target="clean" inheritall="true">
<fileset dir="." includes="scripts/build.custom.*.xml"/>
</subant>
</then>
</if>
<delete dir="build" deleteonexit="true"/>
</target>
<!-- clean up web dir, with safety prompts -->
<target name="cleanWeb" description="deletes web directory as specified by variable IIQHome. you may need to stop the web server before using this target." depends="init-properties">
<if>
<equals arg1="${override.safety.prompts}" arg2="false"/>
<then>
<input
message="Are you sure you want to delete the web app directory [ ${IIQHome} ]? continue (y/n)?"
validargs="y,n"
addproperty="do.delete"
/>
<condition property="do.abort">
<equals arg1="n" arg2="${do.delete}"/>
</condition>
<fail if="do.abort">cleanWeb target aborted by user.</fail>
</then>
</if>
<echo>Deleting ${IIQHome}</echo>
<delete dir="${IIQHome}" deleteonexit="true"/>
<echo>Done!</echo>
</target>
<!-- Ant task to build a time-stamped deployment zip file. This -->
<!-- helps automate the procedure of deploying to Dev, Test, Prod. -->
<!-- Files get named this: PROJNAME-customizations-20110217-1053.zip -->
<target name="zipfile" depends="init-properties">
<delete file="${ant.project.name}-customizations.zip" />
<delete file="${ant.project.name}-customizations-*.zip" />
<echo message="Building zipfile named ${ant.project.name}-customizations-${build.zipstamp}.zip ..."/>
<zip destfile="${ant.project.name}-customizations-${build.zipstamp}.zip"
excludes="**/CVS/**,**/SCCS/**,**/SCCS/**,**/rcs/**,**/.DS_Store/**,**/.svn/**,**/*.pyc/**,**/.pyo/**,**/.git/**,**/*.hprof/**,**/_svn/**,**/.hg/**">
<!-- excludes skips files in sub-directories that are managed by version control systems. -->
<!-- explicitly include certain directories of the build tree: -->
<fileset dir="." includes="build.*"/>
<fileset dir="." includes="*.properties"/>
<fileset dir="." includes="target*common"/>
<fileset dir="." includes="StandardServices*.*"/>
<fileset dir="." includes="ServicesStd*.*"/>
<zipfileset dir="base/" prefix="base/" />
<zipfileset dir="config/" prefix="config/" />
<zipfileset dir="db/" prefix="db/" />
<zipfileset dir="lib/" prefix="lib/" />
<zipfileset dir="scripts/" prefix="scripts/" />
<zipfileset dir="src/" prefix="src/" />
<zipfileset dir="web/" prefix="web/" />
</zip>
</target>
<!--
example target for performing initial build
-->
<target name="initial-build"
description="can perform a repeatable, initial build of IIQ. requires planning for proper execution. see SSB guide for details.">
<echo>Doing intial build</echo>
<antcall target="clean"/>
<antcall target="cleanWeb"/>
<antcall target="main"/>
<antcall target="createdb"/>
<antcall target="extenddb"/>
<antcall target="import-stock"/>
<antcall target="import-lcm"/>
<antcall target="patchdb"/>
<antcall target="runUpgrade"/>
<antcall target="import-custom"/>
<antcall target="dist"/>
<echo>Done with intial build</echo>
</target>
</project>