forked from tdf/odftoolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
733 lines (706 loc) · 35.9 KB
/
pom.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
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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.odftoolkit</groupId>
<artifactId>odftoolkit</artifactId>
<version>0.12.0-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>28</version>
<relativePath/>
</parent>
<properties>
<javadoc.bottom>Copyright © {inceptionYear}–2018 Apache Software Foundation; Copyright © 2018–{currentYear} {organizationName}. All rights reserved.</javadoc.bottom>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- explicitly setting JDK version for compiler source & target -->
<jdk.version>11</jdk.version> <!-- all three JDK versions should not differ -->
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<!-- ANT driven release bundle creation: 3 ZIPs for the complete Toolkit for binaries, documentation and sources -->
<release.dir>${basedir}/target/release</release.dir>
<release.dir.bin>${release.dir}/${project.version}/binaries</release.dir.bin>
<release.dir.doc>${release.dir}/${project.version}/docs</release.dir.doc>
<release.dir.src>${release.dir}/${project.version}/sources</release.dir.src>
<release.tmpdir>${basedir}/target/release-tmp</release.tmpdir>
<release.tmpdir.bin>${release.tmpdir}/${project.version}-bin</release.tmpdir.bin>
<release.tmpdir.doc>${release.tmpdir}/${project.version}-doc</release.tmpdir.doc>
<release.tmpdir.src>${release.tmpdir}/${project.version}-src</release.tmpdir.src>
<release.zip.bin>odftoolkit-${project.version}-bin.zip</release.zip.bin>
<release.zip.doc>odftoolkit-${project.version}-doc.zip</release.zip.doc>
<release.zip.src>odftoolkit-${project.version}-src.zip</release.zip.src>
<supported-odf-version>1.2</supported-odf-version>
<skipTests>false</skipTests>
<!-- to skip even compiling the tests is honored by Surefire, Failsafe and Compiler Plugin -->
<maven.test.skip>${skipTests}</maven.test.skip>
<maven.javadoc.skip>false</maven.javadoc.skip>
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss</maven.build.timestamp.format>
</properties>
<!-- At root project level defining dependencies useable across all projects.
Making version management easy and consistent! -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
</dependency>
<dependency>
<groupId>net.java.dev.msv</groupId>
<artifactId>msv-core</artifactId>
<version>2022.7</version>
</dependency>
<dependency>
<groupId>net.rootdev</groupId>
<artifactId>java-rdfa</artifactId>
<version>1.0.0-BETA1</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.10.12</version>
</dependency>
<!-- used by ODFDOM for metadata -->
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-core</artifactId>
<version>4.9.0</version>
</dependency>
<!-- used by ODFDOM for metadata -->
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-core</artifactId>
<classifier>tests</classifier>
<version>4.9.0</version>
</dependency>
<!-- used by schema2template for XML grammar to graph functionality -->
<dependency>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>neo4j-gremlin</artifactId>
<version>3.7.0</version>
</dependency>
<!-- used by schema2template for XML grammar to graph functionality -->
<dependency>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>tinkergraph-gremlin</artifactId>
<version>3.7.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.24.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.13.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.json/json -->
<!-- used by ODFDOM for serializing user changes to JSON stack (e.g. for web offices) -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20231013</version>
</dependency>
<!-- used by schema2template for filling various templates with grammar data -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>org.iso_relax.verifier.jaxp.validation</groupId>
<artifactId>isorelax-jaxp-bridge</artifactId>
<version>1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jopendocument/isorelax-jaxp-bridge-ILM -->
<dependency>
<groupId>org.jopendocument</groupId>
<artifactId>isorelax-jaxp-bridge-ILM</artifactId>
<version>1.1</version>
</dependency>
<!-- Jena 3.16 requires the following slf4j logging API (therefore our ODFDOM) -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
</dependency>
<!-- Jena 3.16 requires the following slf4j logging API (therefore our ODFDOM) -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version>
</dependency>
<!-- Used by ODFDOM, i.e. org/odftoolkit/odfdom/IElementWriter.java -->
<dependency>
<groupId>xalan</groupId>
<artifactId>serializer</artifactId>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
<version>2.7.3</version>
</dependency>
<!-- used by generator, validator and odfdom module -->
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.12.2</version>
</dependency>
</dependencies>
</dependencyManagement>
<modules>
<module>taglets</module>
<module>generator</module>
<module>xslt-runner</module>
<module>odfdom</module>
<module>validator</module>
</modules>
<name>The ODF Toolkit</name>
<description>
The ODF Toolkit is a set of Java modules that allow
programmatic creation, scanning and manipulation of Open Document Format
(ISO/IEC 26300 == ODF) documents. Unlike other approaches which rely on
runtime manipulation of heavy-weight editors via an automation
interface, the ODF Toolkit is lightweight and ideal for server use.
</description>
<url>https://odftoolkit.org</url>
<organization>
<name>The Document Foundation</name>
<url>https://www.documentfoundation.org/</url>
</organization>
<scm>
<connection>scm:git:git://github.com/tdf/odftoolkit.git</connection>
<developerConnection>scm:git:[email protected]:tdf/odftoolkit.git</developerConnection>
<url>https://github.com/tdf/odftoolkit.git</url>
<tag>HEAD</tag>
</scm>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/tdf/odftoolkit/issues</url>
</issueManagement>
<ciManagement>
<system>travis</system>
<url>https://travis-ci.community</url>
</ciManagement>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/
</url>
</repository>
<!-- not used for deployment but only for site:stage goal -->
<site>
<id>odftoolkit.org</id>
<url>https://odftoolkit.org/reports/${project.version}/</url>
</site>
</distributionManagement>
<developers>
<developer>
<id>svanteschubert</id>
<name>Svante</name>
<email>svanteschubert AT apache.org</email>
<organization>Freelancer</organization>
<roles>
<role>OASIS ODF Collaboration subcommittee chair</role>
<role>OASIS ODF committee editor</role>
<role>architect</role>
<role>developer</role>
</roles>
<timezone>+1</timezone>
</developer>
<developer>
<id>mst</id>
<name>Michael</name>
<organization>allotropia</organization>
<organizationUrl>https://www.allotropia.de/</organizationUrl>
<roles>
<role>OASIS ODF committee editor</role>
<role>developer</role>
</roles>
<timezone>+1</timezone>
</developer>
<developer>
<id>olira</id>
<name>Oliver</name>
<email>opensource AT neomm.net</email>
<organization>Freelancer</organization>
<roles>
<role>architect</role>
<role>developer</role>
</roles>
<timezone>+1</timezone>
</developer>
</developers>
<mailingLists>
<mailingList>
<!--
Help: <[email protected]>
Digest subscription: <[email protected]>
No-mail subscription: <[email protected]>
-->
<post>[email protected]</post>
<subscribe>[email protected]</subscribe>
<unsubscribe>[email protected]</unsubscribe>
<archive>https://listarchives.odftoolkit.org/dev/</archive>
<name>dev.odftoolkit.org</name> <!-- List-Id -->
</mailingList>
</mailingLists>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<!-- <forkCount>3</forkCount>
<reuseForks>true</reuseForks>-->
<argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine>
<systemPropertyVariables>
<odftoolkit.version>${project.version}</odftoolkit.version>
<odftoolkit.git.branch>${git.branch}</odftoolkit.git.branch>
<odftoolkit.git.commit.id.describe>${git.commit.id.describe}</odftoolkit.git.commit.id.describe>
<odftoolkit.git.remote.origin.url>${git.remote.origin.url}</odftoolkit.git.remote.origin.url>
<odftoolkit.git.commit.time>${git.commit.time}</odftoolkit.git.commit.time>
</systemPropertyVariables>
<skipTests>${skipTests}</skipTests>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<!-- defined in the parent pom.xml -->
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<testSource>${jdk.version}</testSource>
<testTarget>${jdk.version}</testTarget>
<encoding>${project.build.sourceEncoding}</encoding>
<showDeprecation>true</showDeprecation>
<meminitial>512m</meminitial>
<maxmem>1024m</maxmem>
<!--
<compilerArgs>
<arg>-Xlint:unchecked</arg>
<arg>-Xlint:deprecation</arg>
</compilerArgs>
-->
<!--
<compilerArgs>
<arg>-verbose</arg>
<arg>-Xlint:all,-options,-path</arg>
</compilerArgs>
-->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>com.cosium.code</groupId>
<artifactId>git-code-format-maven-plugin</artifactId>
<version>2.7</version>
<!-- BUG WORKAROUND: unformatted/uncommitted new files break the build
run from command-line to format:
mvn git-code-format:format-code -D"gcf.globPattern=**/*"
-->
<executions>
<!-- On commit, format the modified java files -->
<execution>
<id>install-formatter-hook</id>
<goals>
<goal>install-hooks</goal>
</goals>
</execution>
<!-- On Maven verify phase, fail if any file
(including unmodified) is badly formatted -->
<execution>
<id>validate-code-format</id>
<goals>
<goal>validate-code-format</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.ec4j.maven</groupId>
<artifactId>editorconfig-maven-plugin</artifactId>
<version>0.1.1</version>
<executions>
<execution>
<id>check</id>
<phase>prepare-package</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- All files are included by default: -->
<includes>
<include>**</include>
</includes>
<excludes>
<!-- +++++++++++ https://ec4j.github.io/editorconfig-maven-plugin/ +++++++++++-->
<!-- Note that maven submodule directories and many non-source file patterns are excluded by default -->
<!-- see https://github.com/ec4j/editorconfig-maven-plugin/blob/master/ec4j-lint-api/src/main/java/org/ec4j/maven/lint/api/Constants.java#L37 -->
<!-- See https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties -->
<!-- !!! 'mvn editorconfig:format' fixes format via command line!!! -->
<!-- You can exclude further files from processing: -->
<!--<exclude>src/main/**/*.whatever</exclude>-->
<exclude>target</exclude>
<exclude>src/test/resources/test-reference/**/*.*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<executions>
<execution>
<id>maven-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<localCheckout>true</localCheckout>
<pushChanges>false</pushChanges>
<mavenExecutorId>forked-path</mavenExecutorId>
<arguments>-Dgpg.passphrase=${gpg.passphraseServerId}</arguments>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>
<version>1.11.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-api</artifactId>
<version>1.11.2</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<!-- https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/ -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>pedantic</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludes>
<!-- for all projects -->
<exclude>.vscode/**/*</exclude>
<exclude>.github/**/*</exclude>
<exclude>.editorconfig</exclude>
<exclude>.gitignore</exclude>
<exclude>**/.classpath</exclude>
<exclude>**/.factorypath</exclude>
<exclude>**/.project</exclude>
<exclude>**/.settings/**</exclude>
<exclude>**/target/**</exclude>
<exclude>.travis.yml</exclude>
<exclude>CHANGES.txt</exclude>
<exclude>CODE_OF_CONDUCT.md</exclude>
<exclude>**/README.md</exclude>
<exclude>DEPENDENCIES</exclude>
<exclude>docs/**/*</exclude>
<exclude>manifest.mf</exclude>
<exclude>nb-configuration.xml</exclude>
<exclude>src/site/**/*</exclude>
<!-- schema2template -->
<exclude>src/test/resources/examples/odf/*.ref</exclude>
<exclude>src/main/resources/examples/odf/odfdom-python/OdfTextDocument.odt</exclude>
<exclude>src/main/resources/examples/odf/odf-schemas/*.rng</exclude>
<exclude>src/main/resources/examples/odf/graphml/*.graphml</exclude>
<!-- odfdom -->
<exclude>src/main/resources/**</exclude>
<exclude>src/test/resources/**</exclude>
<exclude>src/main/javadoc/resources/OpenDocument-v1.2-part1.html</exclude>
<exclude>src/main/javadoc/resources/OpenDocument-v1.2-part3.html</exclude>
<exclude>src/codegen/resources/dom/*.rng</exclude>
<exclude>src/codegen/resources/pkg/*.rng</exclude>
<!-- xslt-runner-task -->
<exclude>nbproject/**</exclude>
</excludes>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Profile for deploying to the Sonatype repository, which
requires GPG signatures
see
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
https://docs.sonatype.org/display/Repository/How+To+Generate+PGP+Signatures+With+Maven
https://issues.sonatype.org/browse/OSSRH-960
-->
<!-- GPG Signature on release -->
<profile>
<id>release-sign-artifacts</id>
<!-- will ask for gpg passphrase for every build on Windows when gpg.keyname exists!
<activation>
<property>
<name>gpg.keyname</name>
</property>
</activation> -->
<build>
<plugins>
<!-- see http://maven.apache.org/plugins/maven-gpg-plugin/usage.html -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<goals>
<goal>sign</goal>
</goals>
<id>default-sign</id>
<phase>verify</phase>
<configuration>
<!-- Add GPG passphrase in Maven settings.xml under .m2 home, see
https://dzone.com/articles/publish-your-artifacts-to-maven-central -->
<keyname>${gpg.keyname}</keyname>
<passphraseServerId>${gpg.passphraseServerId}</passphraseServerId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- The purpose of the following profile is to make a SonaType Maven release.
PRECONDITION:
1) You need to have a GPG Signature specified:
Best in your <USR_HOME>/.m2/settings.xml
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.keyname>YOUR_KEY_ID</gpg.keyname>
<gpg.passphraseServerId>YOUR_KEY_PASSPHRASE</gpg.passphraseServerId>
</properties>
</profile>
</profiles>
see
This profile is being triggered via command line by its id, for instance:
mvn install -Pprepare-release -Ppedantic
This plugin is doing the following
1) All relevant binary & documentation files are being copied via ANT into ${release.tmpdir}
2) Via the Maven Assembly Plugin three ZIPs are being created for sources, binaries and documentations.
3) All ZIPs are signed and copied into the directory: ${release.dir}
-->
<profile>
<id>prepare-release</id>
<build>
<plugins>
<!-- GitHub Release: 3 ZIPs (bin, doc, source) for release-->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<goals>
<goal>run</goal>
</goals>
<id>prepare-github-release</id>
<phase>install</phase>
<configuration>
<target>
<!-- MAKE 3 DIRECTORIES -->
<mkdir dir="${release.dir.bin}"/>
<mkdir dir="${release.dir.doc}"/>
<mkdir dir="${release.dir.src}"/>
<mkdir dir="${release.tmpdir.bin}"/>
<mkdir dir="${release.tmpdir.doc}"/>
<mkdir dir="${release.tmpdir.src}"/>
<!-- COLLECT FILES OF BUNDLES -->
<!-- collect binary artefacts -->
<copy todir="${release.tmpdir.bin}" flatten="true">
<fileset dir="${basedir}">
<include name="*.txt"/>
<include name="KEYS"/>
<include name="NOTICE"/>
<include name="LICENSE"/>
<include name="odfdom/target/*.jar"/>
<include name="simple/target/*.jar"/>
<include name="validator/target/*.war"/>
<include name="validator/target/*.jar"/>
<include name="xslt-runner/target/*.jar"/>
<include name="xslt-runner-task/target/*.jar"/>
<exclude name="**/target/**-javadoc.jar"/>
<exclude name="**/target/**-sources.jar"/>
</fileset>
</copy>
<!-- collect documentation artefacts - without directory hierarchy -->
<copy todir="${release.tmpdir.doc}" flatten="true">
<fileset dir="${basedir}">
<include name="*.txt"/>
<include name="KEYS"/>
<include name="NOTICE"/>
<include name="LICENSE"/>
<include name="**/target/*-javadoc.jar"/>
</fileset>
</copy>
<!-- collect documentation artefacts - keeping directory hierarchy -->
<copy todir="${release.tmpdir.doc}/site">
<fileset dir="${basedir}/docs"/>
</copy>
<!-- collect source code -->
<copy todir="${release.tmpdir.src}">
<fileset dir="${basedir}">
<include name="**"/>
<exclude name="**/target/**"/>
<exclude name="**/.vscode/**"/>
<exclude name="**/.project"/>
<exclude name="**/.classpath"/>
<exclude name="**/.nb-configuration.xml"/>
<exclude name="**/.settings/**"/>
<exclude name="**/.classes/**"/>
<exclude name="**/.idea"/>
</fileset>
</copy>
<!-- ZIP FILES to 3 BUNDLES -->
<zip basedir="${release.tmpdir.bin}" destfile="${basedir}/target/${release.zip.bin}"/>
<zip basedir="${release.tmpdir.doc}" destfile="${basedir}/target/${release.zip.doc}"/>
<zip basedir="${release.tmpdir.src}" destfile="${basedir}/target/${release.zip.src}"/>
<!-- SIGN 3 BUNDLES -->
<checksum algorithm="SHA-512" fileext=".sha">
<fileset dir="${basedir}/target">
<include name="*.zip"/>
<include name="*.tar.gz"/>
<include name="*.tar.bz2"/>
</fileset>
</checksum>
<!-- MOVE THE 3 BUNDLES -->
<move todir="${release.dir.bin}">
<fileset dir="${basedir}/target">
<include name="*-bin.*"/>
</fileset>
</move>
<move todir="${release.dir.doc}">
<fileset dir="${basedir}/target">
<include name="*-doc.*"/>
</fileset>
</move>
<move todir="${release.dir.src}">
<fileset dir="${basedir}/target">
<include name="*-src.*"/>
</fileset>
</move>
<!-- DELETE TEMPORARY DIRECTORIES>-->
<delete quiet="true" dir="${basedir}/target/archive-tmp"/>
<delete quiet="true" dir="${release.tmpdir}"/>
<echo>*** The release has been prepared in: ${release.dir} ***</echo>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.8.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>