forked from assertj/assertj
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pom.xml
677 lines (673 loc) · 23.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
<?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>
<artifactId>assertj-core</artifactId>
<version>3.19.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>AssertJ fluent assertions</name>
<description>Rich and fluent assertions for testing for Java</description>
<parent>
<groupId>org.assertj</groupId>
<artifactId>assertj-parent-pom</artifactId>
<version>2.2.10</version>
<relativePath />
</parent>
<scm>
<developerConnection>scm:git:[email protected]:assertj/assertj-core.git</developerConnection>
<connection>scm:git:[email protected]:assertj/assertj-core.git</connection>
<url>[email protected]:assertj/assertj-core</url>
<tag>HEAD</tag>
</scm>
<issueManagement>
<system>github</system>
<url>https://github.com/assertj/assertj-core/issues</url>
</issueManagement>
<properties>
<javadocAdditionalOptions>-html5 --allow-script-in-comments --no-module-directories</javadocAdditionalOptions>
<byte-buddy.version>1.10.22</byte-buddy.version>
<opentest4j.version>1.2.0</opentest4j.version>
<bnd.version>5.3.0</bnd.version>
<!-- Dependency versions overriding -->
<junit.version>4.13.2</junit.version>
<junit-jupiter.version>5.7.1</junit-jupiter.version>
<mockito.version>3.8.0</mockito.version>
<!-- Plugin versions overriding -->
<jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>${byte-buddy.version}</version>
</dependency>
<dependency> <!-- Included by mockito-core -->
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<version>${byte-buddy.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.opentest4j</groupId>
<artifactId>opentest4j</artifactId>
<version>${opentest4j.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>provided</scope>
<optional>true</optional>
<exclusions>
<!-- This has to be excluded because it's subjecting the code to the incorrect version of certain hamcrest packages. -->
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<!-- required to run JUnit4 tests in eclipse without to explicitly select JUnit 4 runner ... -->
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-testkit</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.opentest4j</groupId>
<artifactId>opentest4j</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.2</version>
<scope>test</scope>
</dependency>
<!-- NEEDED! Unlike File, a Path is not linked to the JRE's filesystem. In order to accurately test assertions, we need
a decent JSR 203 implementation which lets us test our assertions. Right now, this is memoryfilesystem (https://github.com/marschall/memoryfilesystem).
Another choice would be jimfs from Google (https://github.com/google/jimfs), but its support for reading/writing file attributes
is not as complete as that of memoryfilesystem's. -->
<dependency>
<groupId>com.github.marschall</groupId>
<artifactId>memoryfilesystem</artifactId>
<version>2.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.1.1-jre</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.8.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>nl.jqno.equalsverifier</groupId>
<artifactId>equalsverifier</artifactId>
<version>3.5.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
<version>3.16.200</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-dependency-rules</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<includes>
<include>net.bytebuddy:byte-buddy</include>
</includes>
<excludes>
<exclude>org.assertj:assertj-core</exclude>
<exclude>org.hamcrest:hamcrest-core</exclude>
<exclude>*:*:*:jar:compile</exclude>
</excludes>
</bannedDependencies>
<dependencyConvergence />
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<!-- to get jacoco report we need to set argLine in surefire, without this snippet the jacoco argLine is lost -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Dfile.encoding=${project.build.sourceEncoding} ${argLine}</argLine>
<trimStackTrace>false</trimStackTrace>
<excludes>
<exclude>org/assertj/core/osgi/**</exclude>
<exclude>org/assertj/core/internal/objects/Objects_assertHasOnlyFields_Test*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<!-- STEP 2: execute maven shade to rename bytebuddy -->
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<relocations>
<relocation>
<pattern>net.bytebuddy</pattern>
<shadedPattern>org.assertj.core.internal.bytebuddy</shadedPattern>
<excludes>
<exclude>net/bytebuddy/experimental</exclude>
</excludes>
</relocation>
</relocations>
<filters>
<filter>
<artifact>net.bytebuddy:*</artifact>
<excludes>
<exclude>META-INF/**</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
<!-- Unpack the shaded jar so that the maven-bundle-plugin can analyze the packages to import and to export -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- STEP 3: unpack the shaded classes back into the build dir -->
<execution>
<id>unpack-shade</id>
<phase>package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>${bnd.version}</version>
<executions>
<!-- STEP 4: analyze & collect OSGi metadata -->
<execution>
<id>bundle-after-unpack-shaded</id>
<phase>package</phase>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<bnd><![CDATA[
Import-Package:\
!org.assertj.core.*,\
*;resolution:="optional"
Multi-Release: true
-exportcontents: \
!org.assertj.core.internal.*,\
org.assertj.core.*
-noclassforname: true
-noextraheaders: true
-snapshot: SNAPSHOT
-removeheaders: Private-Package
-fixupmessages: \
"Classes found in the wrong directory...";is:=ignore
]]></bnd>
</configuration>
</execution>
<!-- Integration Test Configuration -->
<execution>
<id>bnd-process-tests</id>
<phase>process-test-classes</phase>
<goals>
<goal>bnd-process-tests</goal>
</goals>
<configuration>
<includeClassesDir>false</includeClassesDir>
<bnd><![CDATA[
-includepackage: org.assertj.core.osgi.*
-noextraheaders: true
-snapshot: SNAPSHOT
-removeheaders: Private-Package
]]></bnd>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version><!--$NO-MVN-MAN-VER$ -->
<executions>
<!-- STEP 5: detach the primary artifact so we can re-execute maven-jar-plugin -->
<execution>
<id>remove-primary-artifact</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<script language="beanshell">
project.getReference("maven.project").getArtifact().setFile(null);
</script>
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.beanshell</groupId>
<artifactId>bsh</artifactId>
<version>2.0b5</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<!-- STEP 1: create the initial JAR during prepare-package phase -->
<id>default-jar</id>
<phase>prepare-package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<archive>
<manifestEntries>
<Multi-Release>true</Multi-Release>
</manifestEntries>
</archive>
</configuration>
</execution>
<execution>
<!-- STEP 6: finally jar including shading and OSGi metadata -->
<id>final-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</execution>
<execution>
<id>test-jar</id>
<phase>package</phase>
<goals>
<goal>test-jar</goal>
</goals>
<configuration>
<archive>
<manifestFile>${project.build.testOutputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
<includes>
<include>org/assertj/core/osgi/**</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
<!-- generate jacoco report -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<excludes>
<!-- exclude hamcrest as its classes are compiled in target/classes for an unknown reason related to hamcrest
dependency being optional -->
<exclude>**/*hamcrest*/**</exclude>
</excludes>
</configuration>
<!-- jacoco is executed in the prepare-package phase instead of the verify phase, it can not determine code coverage
of the unpacked shaded classes -->
<executions>
<execution>
<id>jacoco-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-check</id>
<phase>prepare-package</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<rules>
<rule implementation="org.jacoco.maven.RuleConfiguration">
<element>BUNDLE</element>
<limits>
<limit implementation="org.jacoco.report.check.Limit">
<counter>CLASS</counter>
<value>COVEREDRATIO</value>
<minimum>0.98</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase> <!-- invoked by maven-javadoc-plugin -->
<goals>
<goal>compress</goal>
</goals>
</execution>
</executions>
<configuration>
<sourceDirectory>src/main/javadoc</sourceDirectory>
<outputDirectory>${project.build.directory}/javadoc-stylesheet</outputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<!-- Explicitly set Javadoc locale to English -->
<locale>en_US</locale>
<!-- needed to fix javadoc on java 11+ https://github.com/assertj/assertj-core/issues/1403 -->
<source>8</source>
<!-- (1) CSS file location -->
<stylesheetfile>${project.build.directory}/javadoc-stylesheet/assertj-javadoc-min.css</stylesheetfile>
<!-- init Highlight -->
<additionalOptions>${javadocAdditionalOptions}</additionalOptions>
<nohelp>true</nohelp>
<show>private</show>
<footer><![CDATA[
<link rel="stylesheet" href="./assertj-javadoc.css"">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.4.0/highlight.min.js"></script>
<script type="text/javascript">hljs.initHighlightingOnLoad();</script>
]]></footer>
</configuration>
</plugin>
<!-- Resolve bundles for OSGi integration tests -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-resolver-maven-plugin</artifactId>
<version>${bnd.version}</version>
<executions>
<execution>
<id>osgi-integration-resolving</id>
<phase>pre-integration-test</phase>
<goals>
<goal>resolve</goal>
</goals>
<configuration>
<bndruns>
<bndrun>verify.bndrun</bndrun>
</bndruns>
<bundles>
<bundle>target/${project.build.finalName}-tests.jar</bundle>
</bundles>
<failOnChanges>false</failOnChanges>
<reportOptional>false</reportOptional>
<includeDependencyManagement>true</includeDependencyManagement>
<scopes>
<scope>provided</scope>
<scope>compile</scope>
<scope>runtime</scope>
<scope>test</scope>
</scopes>
</configuration>
</execution>
</executions>
</plugin>
<!-- Run OSGi integration tests -->
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-testing-maven-plugin</artifactId>
<version>${bnd.version}</version>
<executions>
<execution>
<id>osgi-integration-testing</id>
<goals>
<goal>testing</goal>
</goals>
<configuration>
<bndruns>
<bndrun>verify.bndrun</bndrun>
</bndruns>
<bundles>
<bundle>target/${project.build.finalName}-tests.jar</bundle>
</bundles>
<failOnChanges>false</failOnChanges>
<includeDependencyManagement>true</includeDependencyManagement>
<resolve>false</resolve>
<scopes>
<scope>provided</scope>
<scope>compile</scope>
<scope>runtime</scope>
<scope>test</scope>
</scopes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<settingsFile>src/it/settings.xml</settingsFile>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
<goals>
<goal>clean</goal>
<goal>test</goal>
</goals>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>install</goal>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.5.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.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<versionRange>[2.6,)</versionRange>
<goals>
<goal>format</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>java9+</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>jdk9</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>9</release>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
</compileSourceRoots>
<outputDirectory>${project.build.outputDirectory}/META-INF/versions/9</outputDirectory>
<compilerArgs>
<arg>--patch-module</arg>
<arg>org.assertj.core=${project.build.outputDirectory}</arg>
<arg>--module-version</arg>
<arg>${project.version}</arg>
</compilerArgs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>java13+</id>
<activation>
<jdk>[13,)</jdk>
</activation>
<properties>
<javadocAdditionalOptions>-html5 --allow-script-in-comments</javadocAdditionalOptions>
</properties>
</profile>
<profile>
<id>java16+</id>
<activation>
<jdk>[16,)</jdk>
</activation>
<properties>
<argLine>-Dnet.bytebuddy.experimental=true --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens=java.base/sun.nio.fs=ALL-UNNAMED</argLine>
</properties>
</profile>
</profiles>
</project>