forked from DSpace/DSpace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
2024 lines (1945 loc) · 95.4 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
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<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.dspace</groupId>
<artifactId>dspace-parent</artifactId>
<packaging>pom</packaging>
<version>9.0-SNAPSHOT</version>
<name>DSpace Parent Project</name>
<description>
DSpace open source software is a turnkey institutional repository application.
</description>
<url>https://github.com/DSpace/DSpace</url>
<organization>
<name>LYRASIS</name>
<url>https://dspace.org</url>
</organization>
<properties>
<!--=== GENERAL / DSPACE-API DEPENDENCIES ===-->
<java.version>17</java.version>
<spring.version>6.1.14</spring.version>
<spring-boot.version>3.3.4</spring-boot.version>
<spring-security.version>6.3.3</spring-security.version> <!-- sync with version used by spring-boot-->
<hibernate.version>6.4.8.Final</hibernate.version>
<hibernate-validator.version>8.0.1.Final</hibernate-validator.version>
<postgresql.driver.version>42.7.3</postgresql.driver.version>
<flyway.version>10.10.0</flyway.version>
<solr.client.version>8.11.3</solr.client.version>
<ehcache.version>3.10.8</ehcache.version>
<errorprone.version>2.32.0</errorprone.version>
<!-- NOTE: when updating jackson.version, also sync jackson-databind.version below -->
<jackson.version>2.16.0</jackson.version>
<jackson-databind.version>2.16.0</jackson-databind.version>
<jakarta-annotation.version>2.1.1</jakarta-annotation.version>
<jaxb-api.version>4.0.2</jaxb-api.version>
<jaxb-runtime.version>4.0.5</jaxb-runtime.version>
<jcache-version>1.1.1</jcache-version>
<!-- NOTE: Jetty needed for Solr, Handle Server & tests -->
<jetty.version>9.4.55.v20240627</jetty.version>
<log4j.version>2.23.1</log4j.version>
<pdfbox-version>2.0.31</pdfbox-version>
<rome.version>1.19.0</rome.version>
<slf4j.version>2.0.11</slf4j.version>
<tika.version>2.9.2</tika.version>
<!-- Sync BouncyCastle & ASM with whatever version Tika uses -->
<bouncycastle.version>1.78.1</bouncycastle.version>
<asm.version>8.0.1</asm.version>
<!-- Jersey is used to integrate with external sources/services -->
<jersey.version>3.1.5</jersey.version>
<!--=== SERVER WEBAPP DEPENDENCIES ===-->
<!-- Library for reading JSON documents: https://github.com/json-path/JsonPath (used by Server webapp) -->
<json-path.version>2.9.0</json-path.version>
<!-- Library for managing JSON Web Tokens (JWT): https://bitbucket.org/connect2id/nimbus-jose-jwt/wiki/Home
(used by Server webapp) -->
<nimbus-jose-jwt.version>9.37.3</nimbus-jose-jwt.version>
<!--=== OTHER MODULE-SPECIFIC DEPENDENCIES ===-->
<!-- Jena is used by both RDF and SWORDv2 -->
<jena.version>4.9.0</jena.version>
<!--=== MAVEN SETTINGS ===-->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>
<!--=== TEST SETTINGS (CUSTOM) ===-->
<!-- By default skip running all tests.
NOTE: Tests are always built, because we have modules that depend on common test infrastructure.
* Run all tests : 'mvn install -DskipUnitTests=false -DskipIntegrationTests=false'
* Run unit tests ONLY: 'mvn install -DskipUnitTests=false'
* Run integration tests ONLY: `mvn install -DskipIntegrationTests=false'
-->
<skipUnitTests>true</skipUnitTests>
<skipIntegrationTests>true</skipIntegrationTests>
<!-- 'root.basedir' is the path to the root [dspace-src] dir. It must be redefined by each child POM,
as it is used to reference the LICENSE.header and *.properties file(s) in that directory. -->
<root.basedir>${basedir}</root.basedir>
</properties>
<build>
<!-- Define Maven Plugin Settings that should be inherited to ALL submodule POMs.
(NOTE: individual POMs can override specific settings). -->
<pluginManagement>
<plugins>
<!-- Use to enforce particular versions of Java and Maven,
and to ensure no conflicting dependencies -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version>
<executions>
<execution>
<id>enforce-java</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>${java.version}</version>
</requireJavaVersion>
<requireMavenVersion>
<version>[3.8,)</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
<!-- Make sure that we do not have conflicting dependencies-->
<execution>
<id>enforce-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<DependencyConvergence />
</rules>
</configuration>
</execution>
<execution>
<id>ban-dependencies</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<excludes>
<exclude>log4j:log4j</exclude>
</excludes>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<!-- Used to compile all Java classes -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<release>${java.version}</release>
<!-- Turn on http://errorprone.info (requires fork=true & below compilerArgs)-->
<fork>true</fork>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
<arg>-Xpkginfo:always</arg>
<!-- Allows for the Reflection API to retrieve parameter names from methods. For example,
it enables @PathVariable annotations to use parameter names automatically. -->
<arg>-parameters</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${errorprone.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<!-- Used to package all DSpace JARs -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<!-- Used to package all DSpace WARs -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<!-- Filter the web.xml (needed for IDE compatibility/debugging) -->
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<!-- Used to run Unit tests (when enabled by -DskipUnitTests=false) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<!-- Allow for the ability to pass JVM memory flags for Unit Tests. Since
maven-surefire-plugin forks a new JVM, it ignores MAVEN_OPTS.-->
<argLine>${test.argLine} ${surefireJacoco}</argLine>
<!-- tests whose name starts by Abstract will be ignored -->
<excludes>
<exclude>**/Abstract*</exclude>
</excludes>
<!-- Detailed logs in surefire-reports/testName-output.txt instead of stdout -->
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<!-- Ensure full stacktrace is logged (when errors occur) -->
<trimStackTrace>false</trimStackTrace>
<!-- Whether to skip unit tests or not -->
<skipTests>${skipUnitTests}</skipTests>
<!-- Do not fail immediately if a test specified via "-Dtest=[testClass]" isn't found.
This allows the build to continue and keep trying to run that test in other modules. -->
<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
<!--
Enable to debug Maven Surefire tests in remote proces
<debugForkedProcess>true</debugForkedProcess>
-->
</configuration>
</plugin>
<!-- Used to run Integration tests (when enabled by -DskipIntegrationTests=false) -->
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<!-- Allow for the ability to pass JVM memory flags for Unit Tests. Since
maven-failsafe-plugin forks a new JVM, it ignores MAVEN_OPTS.-->
<argLine>${test.argLine} ${failsafeJacoco}</argLine>
<excludes>
<exclude>**/Abstract*</exclude>
</excludes>
<!-- Detailed logs in failsafe-reports/testName-output.txt instead of stdout -->
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<!-- Ensure full stacktrace is logged (when errors occur) -->
<trimStackTrace>false</trimStackTrace>
<!-- Whether to skip integration tests or not -->
<skipTests>${skipIntegrationTests}</skipTests>
<!-- Do not fail immediately if a test specified via "-Dit.test=[testClass]" isn't found.
This allows the build to continue and keep trying to run that test in other modules. -->
<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Used to validate all code style rules in source code via the Checkstyle config in checkstyle.xml -->
<!-- Can be skipped by passing -Dcheckstyle.skip=true to Maven. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>verify-style</id>
<!-- Bind to verify so it runs after package & unit tests, but before install -->
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<sourceDirectories>
<sourceDirectory>src/main/java</sourceDirectory>
</sourceDirectories>
<configLocation>${root.basedir}/checkstyle.xml</configLocation>
<logViolationsToConsole>true</logViolationsToConsole>
<failOnViolation>true</failOnViolation>
<!-- Enable checks on all test source files -->
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<!-- Define our suppressions file location, and the key used to pass it to checkstyle.xml-->
<suppressionsLocation>${root.basedir}/checkstyle-suppressions.xml</suppressionsLocation>
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
</configuration>
<dependencies>
<!-- Override dependencies to use latest version of checkstyle -->
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.38</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.8.2.0</version>
<configuration>
<effort>Max</effort>
<threshold>Low</threshold>
<xmlOutput>true</xmlOutput>
</configuration>
<dependencies>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<version>4.8.2</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Used to clean all 'target' directories from parent project -->
<!-- This additional configuration also cleans sub-modules -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.3.2</version>
<configuration>
<filesets>
<fileset>
<directory>dspace/modules</directory>
<includes>
<include>**/target</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
</plugin>
<!-- Used to validate License Headers (see build process) -->
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>3.0</version>
</plugin>
<!-- Used to generate a new release via Sonatype (see release profile). -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
</plugin>
<!-- Used to generate JavaDocs for new releases (see release profile). -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.3</version>
<configuration>
<!-- Never fail a build based on Javadoc errors -->
<failOnError>false</failOnError>
<detectLinks />
<links>
<link>https://docs.spring.io/spring-framework/docs/current/javadoc-api/</link>
<link>https://docs.spring.io/spring-security/site/docs/current/api/</link>
</links>
</configuration>
</plugin>
<!-- Used to generate source JARs for new releases (see release profile). -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<!-- Used for custom Groovy code that fills out the 'agnostic.build.dir' needed to
set 'dspace.dir' for our testing environment -->
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<version>2.1.1</version>
</plugin>
<!-- Used to sign new releases via GPG (see release profile). -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.1</version>
</plugin>
<!-- Used for code coverage reporting (see 'measure-test-coverage' profile) -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.11</version>
</plugin>
</plugins>
</pluginManagement>
<!-- These plugin settings only apply to this single POM and are not inherited
to any submodules. -->
<plugins>
<!-- Specify our settings for new releases via 'mvn release:*' -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<!-- During release:prepare and release:perform, pass the "release" property to enable the
"release" profile (and enable/disable other profiles based on whether they need releasing) -->
<arguments>-Drelease</arguments>
<goals>deploy</goals>
<!-- Suggest tagging the release in SCM as "dspace-[version]" -->
<tagNameFormat>dspace-@{project.version}</tagNameFormat>
<!-- Auto-Version all modules the same as the parent module -->
<autoVersionSubmodules>true</autoVersionSubmodules>
</configuration>
</plugin>
<!-- Check license headers in all files using LICENSE.header template -->
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<!-- License header file (can be a URL, but that's less stable if external site is down on occasion) -->
<header>${root.basedir}/LICENSE.header</header>
<!--Just check headers of everything in the /src directory -->
<includes>
<include>src/**</include>
</includes>
<!--Use all default exclusions for IDE files & Maven files, see:
http://mycila.mathieu.photography/license-maven-plugin/ -->
<useDefaultExcludes>true</useDefaultExcludes>
<!-- Add some default DSpace exclusions not covered by <useDefaultExcludes>
Individual Maven projects may choose to override these defaults. -->
<excludes>
<!-- temporary copy of a modified apache commons-configuration2 class, see https://issues.apache.org/jira/browse/CONFIGURATION-846 -->
<exclude>**/src/main/java/org/dspace/servicemanager/config/DSpaceConfigurationPropertySource.java</exclude>
<exclude>**/src/test/resources/**</exclude>
<exclude>**/src/test/data/**</exclude>
<exclude>**/src/main/license/**</exclude>
<exclude>**/META-INF/**</exclude>
<exclude>**/robots.txt</exclude>
<exclude>**/LICENSE*</exclude>
<exclude>**/README*</exclude>
<exclude>**/readme*</exclude>
<exclude>**/.gitignore</exclude>
<exclude>**/*.cfg</exclude>
<exclude>**/*.conf</exclude>
</excludes>
<mapping>
<!-- Custom DSpace file extensions which are not recognized by license-maven-plugin:
*.ttl (used by RDF), *.ts (used in Docker Compose for UI) -->
<ttl>SCRIPT_STYLE</ttl>
<ts>JAVADOC_STYLE</ts>
</mapping>
<encoding>UTF-8</encoding>
<!-- maven-license-plugin recommends a strict check (e.g. check spaces/tabs too) -->
<strictCheck>true</strictCheck>
</configuration>
<executions>
<execution>
<id>check-headers</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Validate all XML formatted files in the project (including submodules) -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<id>validate-ALL-xml-and-xsl</id>
<phase>process-test-resources</phase>
<goals>
<goal>validate</goal>
</goals>
</execution>
</executions>
<configuration>
<validationSets>
<!-- validate ALL XML and XSL files throughout the project (excluding target dirs) -->
<validationSet>
<dir>${root.basedir}</dir>
<includes>
<include>**/*.xml</include>
<include>**/*.xsl</include>
<include>**/*.xsd</include>
</includes>
<excludes>
<exclude>**/target/**</exclude>
</excludes>
</validationSet>
</validationSets>
</configuration>
</plugin>
<!-- Enforce our version of Java, Maven, dependencies, etc. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
</plugin>
<!-- Enforce our code style via CheckStyle (see settings above) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<!-- Allow for passing extra memory to Unit/Integration tests.
By default this gives unit tests 1GB of memory max (when tests are enabled),
unless tweaked on commandline (e.g. "-Dtest.argLine=-Xmx512m"). Since
m-surefire-p and m-failsafe-p both fork a new JVM for testing, they ignores MAVEN_OPTS. -->
<profile>
<id>test-argLine</id>
<activation>
<property>
<name>!test.argLine</name>
</property>
</activation>
<properties>
<test.argLine>-Xmx1024m</test.argLine>
</properties>
</profile>
<!-- This profile ensures that we generate the Unit Test Environment, whenever the testEnvironment.xml
file is found. This allows us to run Unit & Integration tests separately for CI, etc. -->
<profile>
<id>test-environment</id>
<activation>
<file>
<exists>src/main/assembly/testEnvironment.xml</exists>
</file>
<!-- Disable if we are doing a release (-Drelease) -->
<property>
<name>!release</name>
</property>
</activation>
<build>
<plugins>
<!-- This plugin builds the testEnvironment.zip package
based on the specifications in testEnvironment.xml.
TestEnvironment.zip is an entire DSpace installation
directory, which is installed by 'dspace-api' and
used to run our DSpace Unit/Integration tests. -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>generate-test-resources</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/testEnvironment.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
<inherited>false</inherited>
</plugin>
</plugins>
</build>
</profile>
<!-- Measure test coverage of Unit Tests using JaCoCo (when -DskipUnitTests=false) -->
<profile>
<id>measure-unit-test-coverage</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>skipUnitTests</name>
<value>false</value>
</property>
</activation>
<build>
<plugins>
<!-- Report unit test code coverage -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<!--
Prepares the property pointing to the JaCoCo runtime agent which
is passed as VM argument when Maven the Surefire plugin is executed.
-->
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
<!--
Sets the name of the property containing the settings
for JaCoCo runtime agent.
-->
<propertyName>surefireJacoco</propertyName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Measure test coverage of Integration Tests using JaCoCo (when -DskipIntegrationTests=false) -->
<profile>
<id>measure-integration-test-coverage</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>skipIntegrationTests</name>
<value>false</value>
</property>
</activation>
<build>
<plugins>
<!-- Report integration test code coverage -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<!--
Prepares the property pointing to the JaCoCo runtime agent which
is passed as VM argument when Maven the Failsafe plugin is executed.
-->
<execution>
<id>pre-integration-test</id>
<phase>pre-integration-test</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
<!--
Sets the name of the property containing the settings
for JaCoCo runtime agent.
-->
<propertyName>failsafeJacoco</propertyName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!--
Generate a list of all THIRD PARTY open source licenses for all DSpace dependencies.
This list is automatically written to the [src]/LICENSES_THIRD_PARTY file.
Third party tools whose licenses are unknown by Maven are maintained in
[src]/src/main/license/LICENSES_THIRD_PARTY.properties.
To update "LICENSES_THIRD_PARTY", just run:
mvn clean verify -Dthird.party.licenses=true
-->
<profile>
<id>third-party-licenses</id>
<activation>
<activeByDefault>false</activeByDefault>
<!-- This profile should ONLY be active when user specifies
-Dthird.party.licenses=true on command-line. -->
<property>
<name>third.party.licenses</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.0.0</version>
<!-- This plugin only needs to be run on the Parent POM
as it aggregates results from all child POMs. -->
<inherited>false</inherited>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>aggregate-add-third-party</goal>
</goals>
<configuration>
<outputDirectory>${root.basedir}</outputDirectory>
<thirdPartyFilename>LICENSES_THIRD_PARTY</thirdPartyFilename>
<excludedGroups>org\.dspace</excludedGroups>
<!-- Use the template which groups all dependencies by their License type (easier to read!). -->
<!-- SEE: https://fisheye.codehaus.org/browse/mojo/trunk/mojo/license-maven-plugin/src/main/resources/org/codehaus/mojo/license -->
<fileTemplate>src/main/license/third-party-file-groupByLicense.ftl</fileTemplate>
<!-- License names that should all be merged into the *first* listed name -->
<licenseMerges>
<licenseMerge>Apache Software License, Version 2.0|Apache Software License, version 2.0|The Apache Software License, Version 2.0|Apache License Version 2.0|Apache License, Version 2.0|Apache Public License 2.0|Apache License 2.0|Apache Software License - Version 2.0|Apache 2.0 License|Apache 2.0 license|Apache License V2.0|Apache 2|Apache License|Apache|ASF 2.0|Apache 2.0|Apache License v2|Apache License v2.0|Apache License, 2.0|Apache License, version 2.0|Apache-2.0|The Apache License, Version 2.0</licenseMerge>
<!-- Ant-contrib is an Apache License -->
<licenseMerge>Apache Software License, Version 2.0|http://ant-contrib.sourceforge.net/tasks/LICENSE.txt</licenseMerge>
<!-- XML Commons claims these licenses, but it's really Apache License: https://xerces.apache.org/xml-commons/licenses.html -->
<licenseMerge>Apache Software License, Version 2.0|The SAX License|The W3C License</licenseMerge>
<!-- JDOM uses this license, but it's essentially just Apache -->
<licenseMerge>Apache Software License, Version 2.0|Similar to Apache License but with the acknowledgment clause removed</licenseMerge>
<licenseMerge>BSD License|The BSD License|BSD licence|BSD license|BSD|BSD-style license|New BSD License|New BSD license|Revised BSD License|BSD 2-Clause license|3-Clause BSD License|BSD 2-Clause|BSD 3-clause New License|BSD Licence 3|BSD-2-Clause|BSD-3-Clause|Modified BSD|The New BSD License|The BSD 3-Clause License (BSD3)|BSD License 3|BSD License 2.0</licenseMerge>
<!-- DSpace uses a BSD License -->
<licenseMerge>BSD License|DSpace BSD License|DSpace Sourcecode License</licenseMerge>
<!-- Coverity uses modified BSD: https://github.com/coverity/coverity-security-library -->
<licenseMerge>BSD License|BSD style modified by Coverity</licenseMerge>
<!-- Jaxen claims this license, but it's really BSD: http://jaxen.codehaus.org/license.html -->
<licenseMerge>BSD License|http://jaxen.codehaus.org/license.html</licenseMerge>
<!-- Java Advanced Imaging Image I/O Tools API core is just a BSD: https://github.com/jai-imageio/jai-imageio-core/blob/master/LICENSE.txt -->
<licenseMerge>BSD License|BSD 3-clause License w/nuclear disclaimer</licenseMerge>
<licenseMerge>Common Development and Distribution License (CDDL)|Common Development and Distribution License (CDDL) v1.0|COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0|Common Development and Distribution License|CDDL, v1.0|CDDL 1.0 license|CDDL 1.0|CDDL 1.1|CDDL|Dual license consisting of the CDDL v1.1 and GPL v2</licenseMerge>
<!-- Jersey / Java Servlet API claims this license, but is actually CDDL 1.0: http://servlet-spec.java.net -->
<licenseMerge>Common Development and Distribution License (CDDL)|CDDL + GPLv2 with classpath exception</licenseMerge>
<!-- Jersey claims this license, but it is dual licensed with CDDL 1.1 being one: https://jersey.java.net/license.html -->
<licenseMerge>Common Development and Distribution License (CDDL)|CDDL+GPL License</licenseMerge>
<!-- JavaMail claims this license, but it is dual licensed with CDDL being one: https://java.net/projects/javamail/pages/License -->
<licenseMerge>Common Development and Distribution License (CDDL)|GPLv2+CE|CDDL/GPLv2+CE</licenseMerge>
<!-- JAXB claims this license, but it is dual licensed with CDDL being one: https://jaxb.java.net/ -->
<licenseMerge>Common Development and Distribution License (CDDL)|GPL2 w/ CPE</licenseMerge>
<!-- JBoss Transaction API claims this license, but it is dual licensed with CDDL being one: https://github.com/jboss/jboss-transaction-api_spec -->
<licenseMerge>Common Development and Distribution License (CDDL)|GNU General Public License, Version 2 with the Classpath Exception</licenseMerge>
<licenseMerge>Eclipse Distribution License, Version 1.0|Eclipse Distribution License (EDL), Version 1.0|Eclipse Distribution License - v 1.0|Eclipse Distribution License v. 1.0|EDL 1.0</licenseMerge>
<licenseMerge>Eclipse Public License|Eclipse Public License - Version 1.0|Eclipse Public License - v 1.0|EPL 1.0 license|Eclipse Public License (EPL), Version 1.0|Eclipse Public License 1.0|Eclipse Public License v1.0|Eclipse Public License, Version 1.0|EPL 1.0|EPL 2.0|Eclipse Public License - v 2.0|EPL-2.0|Eclipse Public License 2.0|Eclipse Public License v. 2.0|Eclipse Public License, Version 2.0</licenseMerge>
<!-- JUnit claims this license but is actually Eclipse Public License: http://junit.org/license.html -->
<licenseMerge>Eclipse Public License|Common Public License Version 1.0</licenseMerge>
<!-- Jersey is dual licensed as EPL but lists its main license as GPL: https://github.com/eclipse-ee4j/jersey#licensing-and-governance -->
<licenseMerge>Eclipse Public License|The GNU General Public License (GPL), Version 2, With Classpath Exception</licenseMerge>
<!-- Jakarta Expression Language is dual licensed as EPL and GPL: https://projects.eclipse.org/projects/ee4j.el -->
<licenseMerge>Eclipse Public License|GNU General Public License, version 2 with the GNU Classpath Exception</licenseMerge>
<!-- Jakarta RESTful web services is dual licensed as EPL and GPL: https://github.com/jakartaee/rest -->
<licenseMerge>Eclipse Public License|GPL-2.0-with-classpath-exception</licenseMerge>
<licenseMerge>GNU Lesser General Public License (LGPL)|The GNU Lesser General Public License, Version 2.1|GNU Lesser General Public License (LGPL), Version 2.1|GNU LESSER GENERAL PUBLIC LICENSE, Version 2.1|GNU Lesser General Public License, version 2.1|GNU LESSER GENERAL PUBLIC LICENSE|GNU Lesser General Public License|GNU Lesser Public License|GNU Lesser General Public License, Version 2.1|Lesser General Public License (LGPL) v 2.1|LGPL 2.1|LGPL 2.1 license|LGPL 3.0 license|LGPL, v2.1 or later|LGPL|LGPL, version 2.1|lgpl|Lesser General Public License, version 3 or greater</licenseMerge>
<!-- Hibernate ORM claims this license, but it's really regular LGPL: https://hibernate.org/community/license/ -->
<licenseMerge>GNU Lesser General Public License (LGPL)|GNU Library General Public License v2.1 or later</licenseMerge>
<licenseMerge>MIT License|The MIT License|MIT LICENSE|MIT|MIT license|MIT License (MIT)|The MIT License (MIT)</licenseMerge>
<!-- BouncyCastle uses an MIT-style license: https://www.bouncycastle.org/licence.html -->
<licenseMerge>MIT License|Bouncy Castle Licence</licenseMerge>
<!-- netCDF tools uses an MIT-style license -->
<licenseMerge>MIT License|(MIT-style) netCDF C library license</licenseMerge>
<licenseMerge>Mozilla Public License|Mozilla Public License version 1.1|Mozilla Public License 1.1 (MPL 1.1)|MPL 1.1|Mozilla Public License Version 2.0|Mozilla Public License, Version 2.0|Mozilla Public License Version 1.1</licenseMerge>
<!-- H2 Database claims this license, but for our purposes it's MPL: http://www.h2database.com -->
<licenseMerge>Mozilla Public License|MPL 2.0, and EPL 1.0|MPL 2.0</licenseMerge>
<!-- "concurrent.concurrent" claims this license, but is actually Public Domain: http://mvnrepository.com/artifact/concurrent/concurrent/ -->
<licenseMerge>Public Domain|Public domain, Sun Microsoystems|Public Domain, per Creative Commons CC0</licenseMerge>
<!-- WTFPL is essentially Public Domain: http://www.wtfpl.net/ ;) -->
<licenseMerge>Public Domain|WTFPL</licenseMerge>
</licenseMerges>
<!-- For Licenses which are "Unknown" by Maven, load them from a properties file -->
<useMissingFile>true</useMissingFile>
<missingFile>src/main/license/LICENSES_THIRD_PARTY.properties</missingFile>
<!-- Use the same properties file to override licenses listed in that file -->
<overrideUrl>file:${root.basedir}/src/main/license/LICENSES_THIRD_PARTY.properties</overrideUrl>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!--
These profiles activate the inclusion of various modules into
the DSpace Build process. They activate automatically if the
source module is in the local file system, correctly located
relative to this file.
-->
<!--
Builds DSpace "Assembly & Configuration" project
-->
<profile>
<id>dspace</id>
<activation>
<file>
<exists>dspace/pom.xml</exists>
</file>
</activation>
<modules>
<module>dspace</module>
</modules>
</profile>
<!--
Builds central API for DSpace
-->
<profile>
<id>dspace-api</id>
<activation>
<file>
<exists>dspace-api/pom.xml</exists>
</file>
</activation>
<modules>
<module>dspace-api</module>
</modules>
</profile>
<!--
Builds Services for DSpace
-->
<profile>
<id>dspace-services</id>
<activation>
<file>
<exists>dspace-services/pom.xml</exists>
</file>
</activation>
<modules>
<module>dspace-services</module>
</modules>
</profile>
<!--
Builds XOAI Gateway extension for DSpace
-->
<profile>
<id>dspace-oai</id>
<activation>
<file>
<exists>dspace-oai/pom.xml</exists>
</file>
</activation>
<modules>
<module>dspace-oai</module>
</modules>
</profile>
<!--
Builds RDF API and Data Provider extension for DSpace
-->
<profile>
<id>dspace-rdf</id>
<activation>
<file>
<exists>dspace-rdf/pom.xml</exists>
</file>
</activation>
<modules>
<module>dspace-rdf</module>
</modules>
</profile>
<!--
Builds IIIF extension for DSpace
-->
<profile>
<id>dspace-iiif</id>
<activation>
<file>
<exists>dspace-iiif/pom.xml</exists>
</file>
</activation>
<modules>
<module>dspace-iiif</module>
</modules>
</profile>
<!--
Builds SWORD extension for DSpace
-->
<profile>
<id>dspace-sword</id>
<activation>
<file>
<exists>dspace-sword/pom.xml</exists>
</file>
</activation>
<modules>
<module>dspace-sword</module>
</modules>
</profile>
<!--
Builds SWORDv2 extension for DSpace
-->
<profile>
<id>dspace-swordv2</id>
<activation>
<file>
<exists>dspace-swordv2/pom.xml</exists>
</file>
</activation>
<modules>
<module>dspace-swordv2</module>
</modules>
</profile>
<!--
Builds Server API webapp for DSpace
-->
<profile>
<id>dspace-server-webapp</id>
<activation>
<file>
<exists>dspace-server-webapp/pom.xml</exists>
</file>
</activation>
<modules>
<module>dspace-server-webapp</module>
</modules>
</profile>
<!--
The 'release' profile is used by the 'maven-release-plugin' (see above)
to actually perform a DSpace software release to Maven central.
This profile contains settings which are ONLY enabled when performing
a DSpace release. See also https://wiki.duraspace.org/display/DSPACE/Release+Procedure
NOTE: You MUST trigger this profile by running "-Drelease"
(as that flag also triggers other modules to be enabled/disabled as necessary for release)
-->
<profile>
<id>release</id>
<activation>
<activeByDefault>false</activeByDefault>
<!-- Enable this profile if we are doing a release (-Drelease) -->
<property>
<name>release</name>
</property>
</activation>
<build>
<plugins>
<!-- Configure Nexus plugin for new releases via Sonatype.
See: http://central.sonatype.org/pages/apache-maven.html -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<!-- In your settings.xml, your username/password
MUST be specified for server 'ossrh' -->
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<!-- Disable autoclose of repository after upload, as this sometimes times out -->
<skipStagingRepositoryClose>true</skipStagingRepositoryClose>
<!-- Require manual verification / release to Maven Central -->
<autoReleaseAfterClose>false</autoReleaseAfterClose>
<!-- Increase Staging timeout to 10mins -->
<stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
</configuration>
</plugin>
<!-- For new releases, generate Source JAR files -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- For new releases, generate JavaDocs for each module -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Sign any new releases via GPG.
NOTE: you may optionall specify the "gpg.passphrase" in your settings.xml -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>