|
96 | 96 | <artifactId>junit-jupiter</artifactId> |
97 | 97 | <scope>test</scope> |
98 | 98 | </dependency> |
| 99 | + <!-- required to resolve |
| 100 | + These dependencies are required to workaround a bad |
| 101 | + interaction using includeDependencyManagement=true for |
| 102 | + the Bnd resolver and testing plugins and the enforcer |
| 103 | + plugin which causes a false positive from the enforcer |
| 104 | + plugin. The Bnd 5.2.0 resolver and testing plugins |
| 105 | + don't have this problem, so these dependencies |
| 106 | + can be removed when updating bnd.version to 5.2.0 and |
| 107 | + configuring the Bnd resolver and testing plugins to use |
| 108 | + includeDependencyManagement=true. |
| 109 | + --> |
| 110 | + <dependency> |
| 111 | + <groupId>org.junit.jupiter</groupId> |
| 112 | + <artifactId>junit-jupiter-engine</artifactId> |
| 113 | + <scope>test</scope> |
| 114 | + </dependency> |
| 115 | + <dependency> |
| 116 | + <groupId>org.junit.platform</groupId> |
| 117 | + <artifactId>junit-platform-launcher</artifactId> |
| 118 | + <scope>test</scope> |
| 119 | + </dependency> |
| 120 | + <dependency> |
| 121 | + <groupId>org.junit.platform</groupId> |
| 122 | + <artifactId>junit-platform-engine</artifactId> |
| 123 | + <scope>test</scope> |
| 124 | + </dependency> |
| 125 | + <dependency> |
| 126 | + <groupId>org.junit.platform</groupId> |
| 127 | + <artifactId>junit-platform-commons</artifactId> |
| 128 | + <scope>provided</scope> |
| 129 | + </dependency> |
99 | 130 | <!-- required to run JUnit4 tests in eclipse without to explicitly select JUnit 4 runner ... --> |
100 | 131 | <dependency> |
101 | 132 | <groupId>org.junit.vintage</groupId> |
|
173 | 204 | <version>3.4.2</version> |
174 | 205 | <scope>test</scope> |
175 | 206 | </dependency> |
| 207 | + <dependency> |
| 208 | + <groupId>org.eclipse.platform</groupId> |
| 209 | + <artifactId>org.eclipse.osgi</artifactId> |
| 210 | + <version>3.15.300</version> |
| 211 | + <scope>test</scope> |
| 212 | + </dependency> |
176 | 213 | </dependencies> |
177 | 214 | <build> |
178 | 215 | <plugins> |
|
218 | 255 | <configuration> |
219 | 256 | <argLine>${argLine}</argLine> |
220 | 257 | <trimStackTrace>false</trimStackTrace> |
| 258 | + <excludes> |
| 259 | + <exclude>org/assertj/core/osgi/**</exclude> |
| 260 | + </excludes> |
221 | 261 | </configuration> |
222 | 262 | </plugin> |
223 | 263 | <plugin> |
|
304 | 344 | ]]></bnd> |
305 | 345 | </configuration> |
306 | 346 | </execution> |
| 347 | + <!-- Integration Test Configuration --> |
| 348 | + <execution> |
| 349 | + <id>bnd-process-tests</id> |
| 350 | + <phase>process-test-classes</phase> |
| 351 | + <goals> |
| 352 | + <goal>bnd-process-tests</goal> |
| 353 | + </goals> |
| 354 | + <configuration> |
| 355 | + <includeClassesDir>false</includeClassesDir> |
| 356 | + <bnd><![CDATA[ |
| 357 | + -includepackage: org.assertj.core.osgi.* |
| 358 | + -removeheaders: Bnd-LastModified,Private-Package |
| 359 | + ]]></bnd> |
| 360 | + </configuration> |
| 361 | + </execution> |
307 | 362 | </executions> |
308 | 363 | </plugin> |
309 | 364 | <plugin> |
|
367 | 422 | </archive> |
368 | 423 | </configuration> |
369 | 424 | </execution> |
| 425 | + <execution> |
| 426 | + <id>test-jar</id> |
| 427 | + <phase>package</phase> |
| 428 | + <goals> |
| 429 | + <goal>test-jar</goal> |
| 430 | + </goals> |
| 431 | + <configuration> |
| 432 | + <archive> |
| 433 | + <manifestFile>${project.build.testOutputDirectory}/META-INF/MANIFEST.MF</manifestFile> |
| 434 | + </archive> |
| 435 | + <includes> |
| 436 | + <include>org/assertj/core/osgi/**</include> |
| 437 | + </includes> |
| 438 | + </configuration> |
| 439 | + </execution> |
370 | 440 | </executions> |
371 | 441 | </plugin> |
372 | 442 | <!-- generate jacoco report --> |
|
450 | 520 | ]]></footer> |
451 | 521 | </configuration> |
452 | 522 | </plugin> |
| 523 | + <!-- Resolve bundles for OSGi integration tests --> |
453 | 524 | <plugin> |
454 | | - <!-- Verify that additional OSGi package imports didn't sneak in. --> |
455 | 525 | <groupId>biz.aQute.bnd</groupId> |
456 | 526 | <artifactId>bnd-resolver-maven-plugin</artifactId> |
457 | 527 | <version>${bnd.version}</version> |
458 | 528 | <executions> |
459 | 529 | <execution> |
460 | | - <id>verify-osgi-metadata</id> |
| 530 | + <id>osgi-integration-resolving</id> |
461 | 531 | <phase>pre-integration-test</phase> |
462 | 532 | <goals> |
463 | 533 | <goal>resolve</goal> |
|
466 | 536 | <bndruns> |
467 | 537 | <bndrun>verify.bndrun</bndrun> |
468 | 538 | </bndruns> |
| 539 | + <bundles> |
| 540 | + <bundle>target/${project.build.finalName}-tests.jar</bundle> |
| 541 | + </bundles> |
469 | 542 | <failOnChanges>false</failOnChanges> |
470 | 543 | <reportOptional>false</reportOptional> |
| 544 | + <includeDependencyManagement>false</includeDependencyManagement> |
| 545 | + <scopes> |
| 546 | + <scope>provided</scope> |
| 547 | + <scope>compile</scope> |
| 548 | + <scope>runtime</scope> |
| 549 | + <scope>test</scope> |
| 550 | + </scopes> |
| 551 | + </configuration> |
| 552 | + </execution> |
| 553 | + </executions> |
| 554 | + </plugin> |
| 555 | + <!-- Run OSGi integration tests --> |
| 556 | + <plugin> |
| 557 | + <groupId>biz.aQute.bnd</groupId> |
| 558 | + <artifactId>bnd-testing-maven-plugin</artifactId> |
| 559 | + <version>${bnd.version}</version> |
| 560 | + <executions> |
| 561 | + <execution> |
| 562 | + <id>osgi-integration-testing</id> |
| 563 | + <goals> |
| 564 | + <goal>testing</goal> |
| 565 | + </goals> |
| 566 | + <configuration> |
| 567 | + <bndruns> |
| 568 | + <bndrun>verify.bndrun</bndrun> |
| 569 | + </bndruns> |
| 570 | + <bundles> |
| 571 | + <bundle>target/${project.build.finalName}-tests.jar</bundle> |
| 572 | + </bundles> |
| 573 | + <failOnChanges>false</failOnChanges> |
| 574 | + <includeDependencyManagement>false</includeDependencyManagement> |
| 575 | + <resolve>false</resolve> |
| 576 | + <scopes> |
| 577 | + <scope>provided</scope> |
| 578 | + <scope>compile</scope> |
| 579 | + <scope>runtime</scope> |
| 580 | + <scope>test</scope> |
| 581 | + </scopes> |
471 | 582 | </configuration> |
472 | 583 | </execution> |
473 | 584 | </executions> |
|
0 commit comments