-
Notifications
You must be signed in to change notification settings - Fork 22
/
maven.xml
678 lines (585 loc) · 27 KB
/
maven.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Rev$ $Date$ -->
<project default="new"
xmlns:j="jelly:core"
xmlns:u="jelly:util"
xmlns:ant="jelly:ant"
xmlns:maven="jelly:maven"
xmlns:define="jelly:define"
xmlns:modules="local:modules"
xmlns:gscm="g:scm">
<goal name="new0">
<maven:reactor basedir="${basedir}" includes="tranql/tranql/project.xml"
excludes="" goals="multiproject:install-callback" banner="tranql" ignoreFailures="false" />
</goal>
<goal name="new00">
<maven:reactor basedir="${basedir}" includes="tranql/connector/project.xml,tranql/vendor/*/*/project.xml,tranql/derby/*/project.xml"
excludes="" goals="multiproject:install-callback" banner="tranql-connector" ignoreFailures="false" />
</goal>
<goal name="new1">
<maven:reactor basedir="${basedir}" includes="modules/*/project.xml,plugins/*/project.xml"
excludes="modules/interop/project.xml" goals="multiproject:install-callback" banner="geronimo and geronimo-plugins" ignoreFailures="false" />
</goal>
<goal name="new2">
<maven:reactor basedir="${basedir}" includes="openejb/modules/core/project.xml,openejb/modules/pkgen-builder/project.xml,openejb/modules/openejb-builder/project.xml"
excludes="" goals="multiproject:install-callback" banner="openejb" ignoreFailures="false" />
</goal>
<goal name="new3">
<maven:reactor basedir="${basedir}" includes="applications/*/project.xml,applications/daytrader/*/project.xml"
excludes="" goals="multiproject:install-callback" banner="applications" ignoreFailures="false" />
</goal>
<goal name="new4">
<maven:reactor basedir="${basedir}" includes="configs/*/project.xml"
excludes="" goals="multiproject:install-callback" banner="configurations" ignoreFailures="false" />
</goal>
<goal name="new5">
<maven:reactor basedir="${basedir}" includes="assemblies/*/project.xml"
excludes="" goals="multiproject:install-callback" banner="assemblies" ignoreFailures="false" />
</goal>
<goal name="new">
<attainGoal name="new0"/>
<attainGoal name="new00"/>
<attainGoal name="new1"/>
<attainGoal name="new2"/>
<attainGoal name="new3"/>
<attainGoal name="new4"/>
<attainGoal name="new5"/>
</goal>
<!-- ============= -->
<!-- New m: goals -->
<!-- ============= -->
<!--
| The main goals for multi project build are:
|
| m:default or m:build
| Executes default build for all projects
|
| m:clean
| Deletes the 'target' directory in all projects
|
| m:clean-repo
| Deletes the local repository artifacts of ActiveMQ, Geronimo, OpenEJB, and TranQL
|
| m:rebuild
| Same as m:clean m:default
|
| m:rebuild-all
| Same as m:clean m:clean-repo m:default and it includes geronimo spec modules
|
| m:checkout or m:co
| Checks out ActiveMQ, OpenEJB, and TranQL
|
| m:update
| Updates ActiveMQ, Geronimo, OpenEJB, and TranQL
|
| m:fresh-checkout
| BECAREFUL: Deletes checkout of ActiveMQ, OpenEJB, and TranQL and checks them out again
|
|
| In addition to the above we support a -Dmodules command line option which is a comma
| seperated list of module names (ie. common, core, ...)
-->
<goal name="m:init">
<ant:fileScanner var="scanner">
<ant:fileset dir="${basedir}">
<u:tokenize var="includes" delim=",">${maven.multiproject.includes}</u:tokenize>
<j:forEach var="include" items="${includes}">
<ant:include name="${include}"/>
</j:forEach>
<u:tokenize var="excludes" delim=",">${maven.multiproject.excludes}</u:tokenize>
<j:forEach var="exclude" items="${excludes}">
<ant:exclude name="${exclude}"/>
</j:forEach>
</ant:fileset>
</ant:fileScanner>
<j:set var="maven.multiproject.includes" value=""/>
<j:set var="maven.multiproject.excludes" value=""/>
<j:set var="modules.directories" value=""/>
<u:tokenize var="moduleList" delim=",">${modules}</u:tokenize>
<j:set var="currentDir" value="${basedir}/"/>
<j:forEach var="file" items="${scanner.iterator()}">
<j:set var="directory" value="${file.parentFile.absolutePath}"/>
<j:set var="include" value="${file.absolutePath.substring(currentDir.length())}"/>
<j:if test="${moduleList.isEmpty() || moduleList.contains(file.parentFile.name)}">
<j:choose>
<j:when test="${context.getVariable('maven.multiproject.includes') == ''}">
<j:set var="modules.directories" value="${directory}"/>
<j:set var="maven.multiproject.includes" value="${include}"/>
</j:when>
<j:otherwise>
<j:set var="modules.directories" value="${modules.directories},${directory}"/>
<j:set var="maven.multiproject.includes" value="${maven.multiproject.includes},${include}"/>
</j:otherwise>
</j:choose>
</j:if>
</j:forEach>
</goal>
<goal name="m:rebuild-all" prereqs="m:clean,m:clean-repo,m:default"/>
<goal name="m:rebuild" prereqs="m:clean,m:default"/>
<goal name="m:build-all" prereqs="m:default"/>
<goal name="m:build" prereqs="m:default"/>
<goal name="m:default" prereqs="m:init">
<!-- don't run the active mq tests they take way too long and don't complete successfully -->
<!-- <u:available file="${basedir}/activemq">
<mkdir dir="${basedir}/activemq/modules/core/target/test-reports/"/>
<ant:touch file="${basedir}/activemq/modules/core/target/test-reports/tstamp"/>
</u:available> -->
<j:set var="goal" value="default"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="m:clean-all" prereqs="m:clean"/>
<goal name="m:clean" prereqs="m:init">
<u:tokenize var="directories" delim=",">${modules.directories}</u:tokenize>
<j:forEach var="directory" items="${directories}">
<ant:echo>+----------------------------------------</ant:echo>
<ant:echo>| Cleaning: ${directory} </ant:echo>
<ant:echo>+----------------------------------------</ant:echo>
<ant:delete dir="${directory}/target"/>
<ant:delete quiet="false" failonerror="false">
<ant:fileset dir="${directory}">
<ant:include name="maven.log"/>
<ant:include name="velocity.log*"/>
<ant:include name="junit*.properties"/>
</ant:fileset>
</ant:delete>
<ant:echo></ant:echo>
</j:forEach>
<ant:echo>+----------------------------------------</ant:echo>
<ant:echo>| Cleaning: ${distDir} </ant:echo>
<ant:echo>+----------------------------------------</ant:echo>
<ant:delete dir="${distDir}"/>
<ant:echo></ant:echo>
</goal>
<goal name="m:clean-repo" prereqs="m:init">
<ant:echo>+----------------------------------------</ant:echo>
<ant:echo>| Cleaning: repo </ant:echo>
<ant:echo>+----------------------------------------</ant:echo>
<!--delete dir="${maven.repo.local}/activemq"/-->
<delete dir="${maven.repo.local}/geronimo"/>
<!--delete dir="${maven.repo.local}/howl"/-->
<delete dir="${maven.repo.local}/openejb"/>
<!--<delete dir="${maven.repo.local}/tranql"/>-->
<!-- AMM: specs are no longer in main tree
<j:if test="${context.getVariable('geronimo.all') == 'true'}">
<delete dir="${maven.repo.local}/org.apache.geronimo.specs"/>
</j:if>
-->
</goal>
<goal name="m:test" prereqs="m:init">
<j:set var="goal" value="test"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="m:eclipse" prereqs="m:init">
<j:set var="goal" value="eclipse"/>
<attainGoal name="multiproject:goal"/>
<echo>Fixing up xmlbeans classpath in .classpath files...</echo>
<replace dir="${basedir}"
value="<classpathentry kind="lib" path="target/xmlbeans-classes">"
token="<classpathentry kind="src" path="target/xmlbeans-classes">">
<include name="**/.classpath"/>
</replace>
</goal>
<goal name="m:jar:deploy" prereqs="m:init">
<j:set var="goal" value="jar:deploy"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="m:intellij" prereqs="m:idea"/>
<goal name="m:idea" prereqs="m:init">
<!--include the specs -->
<!--j:set var="maven.multiproject.includes" value="${maven.multiproject.includes},specs/*/project.xml"/-->
<attainGoal name="idea:multiproject"/>
</goal>
<goal name="m:build:start">
<j:set var="goal" value="build:start"/>
<attainGoal name="multiproject:goal"/>
</goal>
<!-- ========= -->
<!-- SCM goals -->
<!-- ========= -->
<define:taglib uri="g:scm">
<j:if test="${context.getVariable('dest') == null}">
<j:set var="dest" value="${basedir}"/>
</j:if>
<define:tag name="checkout">
<ant:cvs command="checkout -P"
quiet="${maven.scm.cvs.quiet}"
cvsRsh="ssh"
cvsRoot="${root}"
dest="${dest}"
package="${module}"
failonerror="true"
/>
</define:tag>
<define:tag name="checkout-tag">
<ant:cvs command="checkout -P"
quiet="${maven.scm.cvs.quiet}"
cvsRsh="ssh"
cvsRoot="${root}"
dest="${dest}"
package="${module}"
tag="${tag}"
failonerror="true"
/>
</define:tag>
<define:tag name="update">
<echo message="updating ${dir}"/>
<ant:cvs command="update -P -d"
quiet="${maven.scm.cvs.quiet}"
cvsRsh="ssh"
dest="${dir}"
failonerror="true"
/>
</define:tag>
</define:taglib>
<goal name="m:co" prereqs="m:checkout"/>
<goal name="m:checkout">
<!--gscm:checkout module="activemq" root="${geronimo.activemq.cvs.access}@cvs.activemq.codehaus.org:/home/projects/activemq/scm"/-->
<!--gscm:checkout module="howl/logger" root="${geronimo.howl.cvs.access}@cvs.forge.objectweb.org:/cvsroot/howl"/-->
<!-- http isn't working to svn.codehaus.org. so using https for now... -->
<ant:exec dir="${basedir}" executable="svn">
<ant:arg line="checkout https://svn.codehaus.org/openejb/branches/v2_0/openejb2 openejb"/>
</ant:exec>
<!-- <gscm:checkout-tag module="openejb" root="${geronimo.openejb.cvs.access}@cvs.openejb.org:/home/projects/openejb/scm" tag="v2_0"/> -->
<!--
<mkdir dir="${basedir}/tranql"/>
<gscm:checkout module="tranql" dest="${basedir}/tranql" root="${geronimo.tranql.cvs.access}@cvs.tranql.codehaus.org:/home/projects/tranql/scm"/>
<gscm:checkout module="connector" dest="${basedir}/tranql" root="${geronimo.tranql.cvs.access}@cvs.tranql.codehaus.org:/home/projects/tranql/scm"/>-->
</goal>
<goal name="m:update">
<ant:exec dir="${basedir}" executable="svn">
<ant:arg line="update"/>
</ant:exec>
<!--gscm:update dir="${basedir}/activemq"/-->
<!--gscm:update dir="${basedir}/howl/logger"/-->
<ant:exec dir="${basedir}/openejb" executable="svn">
<ant:arg line="update"/>
</ant:exec>
<!--
<gscm:update dir="${basedir}/tranql/tranql"/>
<gscm:update dir="${basedir}/tranql/connector"/>
-->
</goal>
<goal name="m:fresh-checkout">
<!--delete dir="${basedir}/activemq"/-->
<!--delete dir="${basedir}/howl"/-->
<delete dir="${basedir}/openejb"/>
<!--<delete dir="${basedir}/tranql"/>-->
<attainGoal name="m:checkout"/>
<ant:exec dir="${basedir}" executable="svn">
<ant:arg line="update"/>
</ant:exec>
</goal>
<!--old style build starts here -->
<j:set var="release.id" value="${pom.standardToLegacyId(pom.id)}-${pom.currentVersion}"/>
<j:set var="distDir" value="target/${pom.groupId}-${pom.currentVersion}"/>
<!-- ======= -->
<!-- Modules -->
<!-- ======= -->
<goal name="modules:reactor:init">
<!--
| Determine the includes which the reactor will use.
|
| Uses 4 properties to control which modules will be include:
|
| module.types Comma seperated list of module types (ie. specs or modules)
| module.includes Comma seperated list of module names (ie. common, core, ...)
| modules Same as module.includes, module.includes initializes to this value
| module.excludes Comma seperated list of module names to exclude
|
| The end result is that modules.reactor.includes is set to the project.xml files
| to include. This is the value the reactor will use.
|
| Example, to only build the common and core modules:
|
| maven -Dmodules=common,core
-->
<j:if test="${context.getVariable('module.types') == null}">
<j:set var="module.types" value="modules,applications,plugins"/>
</j:if>
<j:if test="${context.getVariable('modules') == null}">
<!-- The default is to build everything -->
<j:set var="modules" value="*"/>
</j:if>
<j:if test="${context.getVariable('module.includes') == null}">
<j:set var="module.includes" value="${modules}"/>
</j:if>
<j:if test="${context.getVariable('module.excludes') == null}">
<j:set var="module.excludes" value=""/>
</j:if>
<u:tokenize var="types" delim=",">${module.types}</u:tokenize>
<ant:fileScanner var="scanner">
<ant:fileset dir="${basedir}">
<j:forEach var="type" items="${types}">
<j:choose>
<j:when test="${context.getVariable('module.includes') == '*'}">
<ant:include name="${type}/*/project.xml"/>
</j:when>
<j:otherwise>
<u:tokenize var="includes" delim=",">${module.includes}</u:tokenize>
<j:forEach var="include" items="${includes}">
<u:available file="${basedir}/${type}/${include}/project.xml">
<ant:include name="${type}/${include}/project.xml"/>
</u:available>
</j:forEach>
</j:otherwise>
</j:choose>
<j:choose>
<j:when test="${context.getVariable('module.excludes') == '*'}">
<ant:exclude name="${type}/*/project.xml"/>
</j:when>
<j:otherwise>
<u:tokenize var="excludes" delim=",">${module.excludes}</u:tokenize>
<j:forEach var="exclude" items="${excludes}">
<u:available file="${basedir}/${type}/${exclude}/project.xml">
<ant:exclude name="${type}/${exclude}/project.xml"/>
</u:available>
</j:forEach>
</j:otherwise>
</j:choose>
</j:forEach>
</ant:fileset>
</ant:fileScanner>
<!-- Setup the includes which will be used by the reactor -->
<j:forEach var="file" items="${scanner.iterator()}">
<!--
| Would be nice if reactor would take a file set, but for now just remove
| the baseddir portion of the file's name. So this will essentially strip off
| ${basedir}
-->
<j:set var="directory" value="${file.parentFile.parentFile.name}/${file.parentFile.name}"/>
<j:set var="filename" value="${directory}/${file.name}"/>
<j:choose>
<j:when test="${context.getVariable('modules.reactor.includes') == null}">
<j:set var="modules.directories" value="${directory}"/>
<j:set var="modules.reactor.includes" value="${filename}"/>
</j:when>
<j:otherwise>
<j:set var="modules.directories" value="${modules.directories},${directory}"/>
<j:set var="modules.reactor.includes" value="${modules.reactor.includes},${filename}"/>
</j:otherwise>
</j:choose>
</j:forEach>
</goal>
<!-- Helper tags for modules -->
<define:taglib uri="local:modules">
<define:tag name="reactor">
<attainGoal name="modules:reactor:init"/>
<j:choose>
<j:when test="${goals != null}">
<maven:reactor
basedir="${basedir}"
includes="${modules.reactor.includes}"
banner="Executing (${goals}):"
ignoreFailures="false"
goals="${goals}"
postProcessing="true"
/>
</j:when>
<j:when test="${goals == null}">
<maven:reactor
basedir="${basedir}"
includes="${modules.reactor.includes}"
banner="Executing (${goals}):"
ignoreFailures="false"
postProcessing="true"
/>
</j:when>
</j:choose>
<!-- Set reactor projects in parent scope so goals have access to it -->
<j:set var="reactorProjects" value="${reactorProjects}" scope="parent"/>
</define:tag>
</define:taglib>
<goal name="modules:reactor">
<modules:reactor/>
</goal>
<goal name="modules:default">
<modules:reactor goals="default"/>
</goal>
<goal name="modules:build">
<modules:reactor goals="build"/>
</goal>
<goal name="modules:test">
<modules:reactor goals="test"/>
</goal>
<goal name="modules:site">
<modules:reactor goals="site"/>
</goal>
<goal name="modules:eclipse">
<modules:reactor goals="eclipse"/>
</goal>
<goal name="modules:jar:deploy">
<modules:reactor goals="jar:deploy"/>
</goal>
<goal name="modules:javadoc">
<modules:reactor goals="javadoc"/>
</goal>
<goal name="modules:clover">
<modules:reactor goals="clover.wrapper"/>
</goal>
<goal name="modules:jar-deploy">
<modules:reactor goals="jar:deploy"/>
</goal>
<goal name="modules:java-src">
<modules:reactor goals="java-src"/>
</goal>
<goal name="modules:clean">
<!-- DMB: don't know why we are cleaning this way when we could invoke clean on the submodules -->
<!-- DSS: because if you invoke clean on the children the sub projects try to resolve their dependencies -->
<attainGoal name="modules:reactor:init"/>
<u:tokenize var="directories" delim=",">${modules.directories}</u:tokenize>
<j:forEach var="directory" items="${directories}">
<ant:echo>+----------------------------------------</ant:echo>
<ant:echo>| Cleaning: ${directory} </ant:echo>
<ant:echo>+----------------------------------------</ant:echo>
<ant:delete dir="${directory}/target"/>
<ant:delete file="${directory}/velocity.log" quiet="true" failonerror="false"/>
<ant:echo></ant:echo>
</j:forEach>
<ant:echo>+----------------------------------------</ant:echo>
<ant:echo>| Cleaning: ${distDir} </ant:echo>
<ant:echo>+----------------------------------------</ant:echo>
<ant:delete dir="${distDir}"/>
</goal>
<goal name="modules:clobber">
<attainGoal name="modules:reactor:init"/>
<u:tokenize var="directories" delim=",">${modules.directories}</u:tokenize>
<j:forEach var="directory" items="${directories}">
<ant:echo>+----------------------------------------</ant:echo>
<ant:echo>| Clobbering: ${directory} </ant:echo>
<ant:echo>+----------------------------------------</ant:echo>
<ant:delete dir="${directory}/target"/>
<ant:delete quiet="false" failonerror="false">
<ant:fileset dir="${directory}">
<ant:include name="maven.log"/>
<ant:include name="velocity.log*"/>
<ant:include name="junit*.properties"/>
</ant:fileset>
</ant:delete>
<ant:echo></ant:echo>
</j:forEach>
<ant:echo>+----------------------------------------</ant:echo>
<ant:echo>| Clobbering: ${distDir} </ant:echo>
<ant:echo>+----------------------------------------</ant:echo>
<ant:delete dir="${distDir}"/>
</goal>
<preGoal name="clean:clean">
<!-- Do not clean modules if are clobbering them -->
<j:if test="${clobbering != 'true'}">
<attainGoal name="modules:clean"/>
</j:if>
</preGoal>
<preGoal name="clobber">
<j:set var="clobbering" value="true"/>
<attainGoal name="modules:clobber"/>
</preGoal>
<goal name="default">
<attainGoal name="modules:default"/>
</goal>
<goal name="test">
<attainGoal name="modules:test"/>
</goal>
<goal name="eclipse">
<attainGoal name="modules:eclipse"/>
</goal>
<goal name="jar:deploy">
<attainGoal name="modules:jar:deploy"/>
</goal>
<goal name="java-src">
<attainGoal name="modules:java-src"/>
<ant:mkdir dir="${basedir}/target"/>
<ant:jar destfile="${basedir}/target/${pom.groupId}-${pom.currentVersion}-java-src.jar">
<j:forEach var="module" items="${reactorProjects}">
<j:set var="module.root" value="${module.file.parent}"/>
<u:available file="${module.root}/target/${module.artifactId}-${module.currentVersion}-java-src.jar">
<zipfileset src="${module.root}/target/${module.artifactId}-${module.currentVersion}-java-src.jar"/>
</u:available>
</j:forEach>
</ant:jar>
</goal>
<goal name="plugins">
<ant:echo>This step is no longer necessary. Simply use 'maven' to build the server.</ant:echo>
</goal>
<!-- =============================== -->
<!-- Documentation & Site Generation -->
<!-- =============================== -->
<goal name="javadoc">
<attainGoal name="modules:javadoc"/>
</goal>
<preGoal name="xdoc:jelly-transform">
<attainGoal name="html2xdoc"/>
<attainGoal name="faq"/>
</preGoal>
<!-- Turn off reports for the top-level project -->
<postGoal name="xdoc:register-reports">
<attainGoal name="maven-license-plugin:deregister"/>
<attainGoal name="maven-checkstyle-plugin:deregister"/>
<attainGoal name="maven-pmd-plugin:deregister"/>
<attainGoal name="maven-simian-plugin:deregister"/>
<attainGoal name="maven-jdepend-plugin:deregister"/>
<attainGoal name="maven-jxr-plugin:deregister"/>
<attainGoal name="maven-javadoc-plugin:deregister"/>
<attainGoal name="maven-junit-report-plugin:deregister"/>
<attainGoal name="maven-clover-plugin:deregister"/>
<!-- Run some useful top-level reports -->
<!--<attainGoal name="maven-changelog-plugin:deregister"/>-->
<!--<attainGoal name="maven-file-activity-plugin:deregister"/>-->
<!--<attainGoal name="maven-developer-activity-plugin:deregister"/>-->
</postGoal>
<preGoal name="site">
<attainGoal name="modules:aggregate:site"/>
</preGoal>
<postGoal name="site">
<j:set var="aggregate.dir" value="${basedir}/${distDir}/docs"/>
<!-- Copy project docs -->
<ant:echo>Copying project docs to ${aggregate.dir}...</ant:echo>
<ant:copy todir="${aggregate.dir}">
<ant:fileset dir="${basedir}/target/docs"/>
</ant:copy>
</postGoal>
<goal name="modules:aggregate:site" prereqs="modules:site"
description="Copy the generated websites of all the modules into the root project">
<ant:echo>Aggregating module site documentation...</ant:echo>
<!-- Setup the target aggregation directory -->
<j:set var="aggregate.dir" value="${basedir}/${distDir}/docs"/>
<ant:mkdir dir="${aggregate.dir}"/>
<j:forEach var="module" items="${reactorProjects}">
<ant:echo>Processing ${module.id}...</ant:echo>
<!-- Get the modules root directory -->
<j:set var="module.root" value="${module.file.parent}"/>
<!-- Setup the target dir under docs -->
<j:set var="moduleDirName">${module.file.parentFile.name}</j:set>
<j:set var="moduleTypeDirName">${module.file.parentFile.parentFile.name}</j:set>
<j:set var="outputDir">${aggregate.dir}/${moduleTypeDirName}/${moduleDirName}</j:set>
<!-- Copy module docs -->
<ant:echo>Copying docs to ${outputDir}...</ant:echo>
<ant:mkdir dir="${outputDir}"/>
<ant:copy todir="${outputDir}">
<ant:fileset dir="${module.root}/target/docs"/>
</ant:copy>
</j:forEach>
</goal>
<goal name="site:tocvs"
description="Creates the entire website and copies it to the local CVS repository so that it can be checked in to update the site">
<j:jelly xmlns="jelly:ant">
<j:if test="${empty(geronimo.cvs.docdir)}">
<j:set var="geronimo.cvs.docdir" value="../incubator-site/build/site/projects/geronimo"/>
</j:if>
<mkdir dir="${geronimo.cvs.docdir}"/>
<copy todir="${geronimo.cvs.docdir}">
<fileset dir="${basedir}/${distDir}/docs"/>
</copy>
</j:jelly>
</goal>
</project>