This repository has been archived by the owner on Nov 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
/
pom.xml
876 lines (793 loc) · 30 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
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.metas</groupId>
<artifactId>de.metas.parent.general</artifactId>
<version>10.0.0</version>
<packaging>pom</packaging>
<description>
Default parent pom with common settings (e.g. java file encoding) to be used by all maven projects.
</description>
<url>http://www.metasfresh.com/</url>
<organization>
<name>metas GmbH</name>
<url>http://www.metasfresh.com/</url>
</organization>
<inceptionYear>2015</inceptionYear>
<developers>
<developer>
<name>metasfresh contributors</name>
<organizationUrl>http://www.metasfresh.com/</organizationUrl>
<email>contributors@metasfresh.com</email>
</developer>
</developers>
<properties>
<!-- this is our default; individual projects might need to specify their own settings -->
<metasfresh.java.version>1.8</metasfresh.java.version>
<!--
3.8.0 is currently the latest and greatest. Spring boot declares some 2.x version that
see http://docs.spring.io/spring-boot/docs/1.2.3.RELEASE/reference/htmlsingle/#howto-customize-dependency-versions-with-maven
-->
<assertj.version>3.8.0</assertj.version>
<!-- right now 6.2.2 is the latest, but there we suffer from http://community.jaspersoft.com/jasperreports-library/issues/7521 -->
<jasperreports.version>6.2.1</jasperreports.version>
<!-- FRESH-397: jasper 6.2.1 uses poi and zxing with theses versions -->
<!-- actually, jasper-6.2.1 accidentally uses 2.1.7.js5-SNAPSHOT, but we don't-->
<itext.version>2.1.7.js5</itext.version>
</properties>
<modules>
<!-- this module provides a shared set of assembly descriptors-->
<module>assemblies</module>
</modules>
<!--
<repositories>
<repository>
<id>metasfresh-repo</id>
<name>metasfresh maven repository (master branch)</name>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<url>https://repo.metasfresh.com/content/groups/mvn-master/</url>
</repository>
</repositories>
-->
<pluginRepositories>
<!-- our main repo is also our plugin repo; also see https://maven.apache.org/pom.html#Plugin_Repositories -->
<!-- see https://github.com/metasfresh/metasfresh-parent/issues/3 -->
<pluginRepository>
<id>metasfresh-repo</id>
<name>metasfresh maven repository (master branch)</name>
<url>https://repo.metasfresh.com/content/groups/mvn-master/</url>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<!--
Where to deploy build artifacts; the values are coming from the outside via cmd-line parameters.
Even if you can't deploy to this repo, you can still make your own builds and install them to your local repo.
-->
<repository>
<id>${deploy-repo-id}</id>
<name>${deploy-repo-name}</name>
<url>${deploy-repo-url}</url>
</repository>
</distributionManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>${jasperreports.version}</version>
<exclusions>
<!-- exclude olap4j because we don't need it and jasperreports 6.2.1 uses the rather obscure version 0.9.7.309-JS-3 which i can't find -->
<exclusion>
<groupId>org.olap4j</groupId>
<artifactId>olap4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>${itext.version}</version>
</dependency>
<!-- this also contains the javax.annotations -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
<version>2.0.1</version>
</dependency>
<!-- Thx for the two fonts to http://ansuz.sooke.bc.ca/page/fonts ^^ -->
<dependency>
<groupId>jp.osdn.ocra</groupId>
<artifactId>jp.osdn.ocra</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>jp.osdn.ocrb</groupId>
<artifactId>jp.osdn.ocrb</artifactId>
<version>0.2.1</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<!-- we set the metasfresh-wide encoding for code and resource files to be UTF-8 by default -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<encoding>UTF-8</encoding>
<source>${metasfresh.java.version}</source>
<target>${metasfresh.java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- note that currently we prefer org.jvnet.jaxb2.maven2:maven-jaxb2-plugin,
but don't have time to kick out this one -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>2.3.1</version> <!-- https://github.com/metasfresh/metasfresh/issues/1598 -->
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.13.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-reactor-plugin</artifactId>
<version>1.1</version>
</plugin>
<!-- Add the generic info plus ci build info to the manifests of all jars that we create -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
<manifestEntries>
<ciBuildNo>${BUILD_NUMBER}</ciBuildNo>
<ciBuildTag>${BUILD_TAG}</ciBuildTag>
<ciJobName>${JOB_NAME}</ciJobName>
<ciBuildUrl>${BUILD_URL}</ciBuildUrl>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<!-- Jacoco prepare-agent builds some command-line params without which jacoco will not instrument.
Hence it is important to add those command-line params where @{argLine} holds those params.
Note that the @ is not a typo.
See https://www.jacoco.org/jacoco/trunk/doc/prepare-agent-mojo.html and https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#argLine -->
<argLine>@{argLine} -Xms256m -Xmx2048m</argLine>
<!-- From http://www.jacoco.org/jacoco/trunk/doc/maven.html :
When using the maven-surefire-plugin or maven-failsafe-plugin you must not use a forkCount of 0
or set the forkMode to never as this would prevent the execution of the tests with the javaagent set and no coverage would be recorded.
-->
<forkCount>1</forkCount>
<!-- 'random' might be a good idea in general, but due to our known problems, prefer determinability
Again, see Spring boot related tests fail on jenkins sometimes https://github.com/metasfresh/metasfresh/issues/2988 -->
<runOrder>filesystem</runOrder>
<!-- runOrder>random</runOrder -->
<systemPropertyVariables>
<concordion.output.dir>${acceptance.reports.dir}</concordion.output.dir>
</systemPropertyVariables>
<includes>
<!-- default inclusions, see http://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html -->
<include>**/Test*.java</include>
<include>**/*Test.java</include>
<include>**/*TestCase.java</include>
<!-- additional include, because we often use that pattern -->
<include>**/*Tests.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<!--
gh #968: If we run mvn properties:write-project-properties
then store the properties to a file calle "app.properties".
We need this for https://github.com/metasfresh/metasfresh/issues/968
because among those properties there are some artifact versions that we want to document.
-->
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
<outputFile>app.properties</outputFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M1</version>
<dependencies>
<!-- needed for banDuplicateClasses -->
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>extra-enforcer-rules</artifactId>
<version>1.0-beta-4</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.1</version>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.vaadin</groupId>
<artifactId>
vaadin-maven-plugin
</artifactId>
<versionRange>
[7.6.1,)
</versionRange>
<goals>
<goal>compile-theme</goal>
<goal>resources</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>set-system-properties</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.alexnederlof</groupId>
<artifactId>jasperreports-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>jasper</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<!--
The enforcer plugin can be a tremendous nuisance.
It fails because we use version ranges in our parent pom declarations with this outout:
[WARNING] Could not find org.jmockit:jmockit:jar:1.30:test at null
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequirePluginVersions failed with message:
Failure to find de.metas:de.metas.parent:pom:(1.0.0,3) in (URL ...) was cached in the local repository, resolution will not be reattempted...
de.metas:de.metas.parent:pom:(1.0.0,3)
However, when running on jenkins, we resolve the parent version anyways (using the maven-versions-plugin)
and *then* we can benefit a lot from making sure that the plugin versions are not a moving target
-->
<id>enforcer-profile</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<configuration>
<rules>
<!-- task 08834: We shall not leave the decision about plugin-versions
to maven. Rationale: we had the case that a build stopped working at a *very*
critical moment, because maven picked a more recent version of the jaxb plugin.
That version didn't support the way, we configured it and failed with an
error message. This shall not happen again. -->
<requirePluginVersions>
<message>!! We need to have the plugin version under control to avoid build failures due to maven releasing a new plugin versionm !!</message>
<banLatest>true</banLatest>
<banRelease>true</banRelease>
<banSnapshots>true</banSnapshots>
<phases>clean,deploy,site</phases>
<additionalPlugins>
<additionalPlugin>org.apache.maven.plugins:maven-reactor-plugin</additionalPlugin>
</additionalPlugins>
<unCheckedPluginList>org.apache.maven.plugins:maven-enforcer-plugin,org.apache.maven.plugins:maven-eclipse-plugin</unCheckedPluginList>
</requirePluginVersions>
<!-- See http://maven.apache.org/enforcer/enforcer-rules/dependencyConvergence.html -->
<dependencyConvergence />
<!--
metas 10.x.x dependencies are only for local use (i.e. just in your local workspace).
We can't allow them to be build on jenkins, because then they would be deployed to the maven repos and shadow the "actual" builds with correct build numbers.
Also see http://maven.apache.org/enforcer/enforcer-rules/bannedDependencies.html
-->
<bannedDependencies>
<excludes>
<exclude>de.metas*:*:[10,)</exclude>
</excludes>
</bannedDependencies>
<banDuplicateClasses>
<ignoreClasses>
<!-- itext-2.1.7 has two different versions as dependences -->
<ignoreClass>org.bouncycastle.*</ignoreClass>
<!-- org.jboss.client:jbossall-client and partially geronimo specs -->
<ignoreClass>javax.annotation.*</ignoreClass>
<ignoreClass>javax.ejb.*</ignoreClass>
<ignoreClass>javax.jms.*</ignoreClass>
<ignoreClass>javax.management.j2ee.*</ignoreClass>
<ignoreClass>javax.xml.*</ignoreClass>
<ignoreClass>javax.transaction.*</ignoreClass>
<ignoreClass>org.apache.*</ignoreClass>
<ignoreClass>org.codehaus.*</ignoreClass>
<ignoreClass>hidden.org.codehaus.*</ignoreClass>
<ignoreClass>org.junit.*</ignoreClass>
<ignoreClass>org.w3c.*</ignoreClass>
<ignoreClass>org.xml.*</ignoreClass>
<!-- this class originates from org.zkoss.calendar:calendar:jar:1.0.0-RC -->
<ignoreClass>org.zkoss.calendar.render.CalendarsDefault</ignoreClass>
<!-- the following are camel/servicemix related dependencies -->
<!-- Found in, both are dependencies of mylin-smooks-all org.ow2.bundles:ow2-bundles-externals-opencsv:jar:1.0.23:compile
net.sf.opencsv:opencsv:jar:2.1:compile -->
<ignoreClass>au.com.bytecode.*</ignoreClass>
<ignoreClass>com.microsoft.schemas.*</ignoreClass>
<ignoreClass>org.etsi.uri.*</ignoreClass>
<ignoreClass>org.openxmlformats.schemas.*</ignoreClass>
<ignoreClass>org.w3.x2000.*</ignoreClass>
<!-- Found in: xmlpull:xmlpull:jar:1.1.3.1:compile xpp3:xpp3_min:jar:1.1.4c:compile -->
<ignoreClass>org.xmlpull.*</ignoreClass>
<!-- Found in: org.apache.xmlbeans:xmlbeans:jar:2.3.0:compile org.apache.servicemix.bundles:org.apache.servicemix.bundles.poi:jar:3.12_1:compile -->
<ignoreClass>schemaorg_apache_xmlbeans.system.*</ignoreClass>
<ignoreClass>repackage.Repackager</ignoreClass>
<ignoreClass>repackage.Repackage</ignoreClass>
<ignoreClass>repackage.EditBuildScript</ignoreClass>
<!-- Found in: org.apache.tomcat.embed:tomcat-embed-core:jar:8.0.30:compile
javax.servlet:javax.servlet-api:jar:3.1.0:provided -->
<ignoreClass>javax.servlet.*</ignoreClass>
</ignoreClasses>
<dependencies>
<!-- See https://groups.google.com/forum/#!topic/jmockit-users/nwNw-la_FAM
("JUnit classes in JMockit jar") for background info -->
<dependency>
<artifactId>jmockit</artifactId>
<ignoreClasses>
<ignoreClass>org.junit.runner.Runner</ignoreClass>
</ignoreClasses>
</dependency>
<!-- this is a dependency of spring-boot-starter-test 1.4.1 the error
message we are avoiding this was goes like this: ================= Duplicate
classes found: Found in: org.ow2.asm:asm:jar:5.0.3:test net.minidev:accessors-smart:jar:1.1:test
Duplicate classes: org/objectweb/asm/Type.class [...] ================= -->
<dependency>
<groupId>net.minidev</groupId>
<artifactId>accessors-smart</artifactId>
<ignoreClasses>
<ignoreClass>org.objectweb.asm.*</ignoreClass>
</ignoreClasses>
</dependency>
<!-- see also https://www.elastic.co/blog/to-shade-or-not-to-shade -->
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<ignoreClasses>
<ignoreClass>org.joda.*</ignoreClass>
</ignoreClasses>
</dependency>
<!-- the embedded tomcat of spring-boot 1.5.3.RELEASE comes with baked-in javax.persistance api classes.. -->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<ignoreClasses>
<ignoreClass>javax.persistence.*</ignoreClass>
</ignoreClasses>
</dependency>
</dependencies>
<findAllDuplicates>true</findAllDuplicates>
</banDuplicateClasses>
</rules>
<fail>true</fail>
</configuration>
<executions>
<execution>
<id>enforce</id>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- If there is a configs directory, then this profile will activate and zip up the files in that directory -->
<id>configs</id>
<activation>
<file>
<exists>src/main/configs</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<dependencies>
<dependency>
<groupId>de.metas</groupId>
<artifactId>metasfresh-assemblies</artifactId>
<version>[1.0.0,10.0.0]</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>make-configs-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>configs</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!--
If the environment variable MF_VERSION is not set, it means that
we are not building on jenkins, so we substitute the value "LOCAL-NO-RELEASE" instead.
Without any value, the spring-boot release-info goal will probably fail since is usually tries to write this value into the build-info.properties file
See https://github.com/metasfresh/metasfresh/issues/2110 -->
<!-- Note that until now i don't see a reason to add a pendant for this to /de.metas.adempiere.adempiere.base/src/main/java-legacy/org/compiere/Adempiere.java ..so i don't.. -->
<profile>
<id>jenkins-BUILD_NUMBER-not-set</id>
<activation>
<property>
<name>!env.BUILD_NUMBER</name>
</property>
</activation>
<properties>
<!-- This property is set by jacoco and used in the surefire config fourther down
Set it to empty to avoid JVM startup error Could not find or load main class @{argLine} when run without jacoco
thx to
* https://github.com/metasfresh/metasfresh/issues/3073
* http://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html -->
<argLine></argLine>
<env.MF_VERSION>LOCAL-NO-RELEASE</env.MF_VERSION>
<env.MF_RELEASE_VERSION>0.0</env.MF_RELEASE_VERSION> <!-- needs to be like this for the launch4j plugin's sake -->
<env.BUILD_TAG>LOCAL-NO-RELEASE</env.BUILD_TAG>
<env.BUILD_URL>LOCAL-NO-RELEASE</env.BUILD_URL>
<env.JOB_NAME>LOCAL-NO-RELEASE</env.JOB_NAME>
<env.BUILD_NUMBER>0</env.BUILD_NUMBER>
</properties>
</profile>
<!--
If the src/main/docker is present, then this profile defines a dedicated property project.build.directory
and copies its contents and also the contents of src/main/configs (if it exists) into that directory.
The actual build can then provide additional files to ${project.build.directory}.
Note that the actual docker building is (currently) done outside of maven.
-->
<profile>
<id>prepare-docker</id>
<activation>
<file>
<exists>src/main/docker</exists>
</file>
</activation>
<properties>
<!-- this value needs to be in sync with our createAndPublishDockerImage jenkins pipeline step -->
<docker.build.directory>target/docker</docker.build.directory>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-docker-folder-for-docker-build</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${docker.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/docker</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-configs-folder-for-docker-build</id>
<phase>package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${docker.build.directory}/configs</outputDirectory>
<resources>
<resource>
<directory>src/main/configs</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!--
Add code coverage metrics to our builds https://github.com/metasfresh/metasfresh/issues/2343
Also define an additional repository with placeholders. The jenkins build jobs will set the values from outside.
Jenkins by default defines a property BUILD_NUMBER which is used to enable the profile.
-->
<profile>
<id>jenkins-BUILD_NUMBER-set</id>
<activation>
<property>
<name>env.BUILD_NUMBER</name>
</property>
</activation>
<repositories>
<!-- this additional repo's parameters can be set from outside. It usually corresponds to a (task-)branch -->
<repository>
<id>${deploy-repo-id}</id>
<name>${deploy-repo-name}</name>
<url>${deploy-repo-url}</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<!-- https://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html -->
<id>jacoco-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- If there is a jasper sources directory, this profile will activate
It will compile those jrxml files and then assemble the jasper files into
a jar. It will *NOT* add src/main/jasperreports as additional source folder,
(that's done by the "jasper-source-folder" profile) -->
<id>jasper-build</id>
<activation>
<file>
<exists>src/main/jasperreports</exists>
</file>
</activation>
<build>
<plugins>
<!-- outputDirectory is the same as jasperreports-maven-plugin's outputDirectory -->
<!-- jrxmls are compiled into jasper files, they don't need to be copied, so we exclude *.jrxml -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/jasper</outputDirectory>
<resources>
<resource>
<directory>src/main/jasperreports</directory>
<excludes>
<exclude>**/*.jrxml</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.alexnederlof</groupId>
<artifactId>jasperreports-plugin</artifactId>
<version>2.0</version>
<configuration>
<!-- These are the default configurations: -->
<compiler>net.sf.jasperreports.engine.design.JRJdtCompiler</compiler>
<sourceDirectory>src/main/jasperreports</sourceDirectory>
<outputDirectory>${project.build.directory}/jasper</outputDirectory>
<outputFileExt>.jasper</outputFileExt>
<xmlValidation>true</xmlValidation>
<verbose>false</verbose>
<numberOfThreads>4</numberOfThreads>
<failOnMissingSourceDirectory>true</failOnMissingSourceDirectory>
<sourceScanner>org.codehaus.plexus.compiler.util.scan.StaleSourceScanner</sourceScanner>
</configuration>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>jasper</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>net.sf.barcode4j</groupId>
<artifactId>barcode4j-fop-ext-complete</artifactId>
<version>2.0</version>
<type>jar</type>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7.js6</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<dependencies>
<dependency>
<groupId>de.metas</groupId>
<artifactId>metasfresh-assemblies</artifactId>
<!-- version>${metasfresh.assembly.descriptor.version}</version -->
<version>[1.0.0,10.0.0]</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>make-jasper-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>jasper</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
<execution>
<id>make-jasper-sources-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>jasper_sources</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- Adds src/main/jasperreports as additional source folder (if the directory is present)
this is only intended to be active when running in eclipse, and not for *any* actual maven build.
We don't want the jasper-stuff to end up in a "regular" artifact jar!
Particularly the properties files need to be overridden in certain situations,
so we can't afford to have an additional copy in the classpath via regular jars
Hint: in eclipse, you can activate this profile in the projects where you need it,
by opening the projects properties (=>maven).
But, then you can't build a proper artifact using eclipse-maven -->
<id>jasper-source-folder</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/main/jasperreports</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>