Skip to content

Commit 0abd5bc

Browse files
committed
Modular builds
1 parent cfe38e7 commit 0abd5bc

File tree

6 files changed

+183
-36
lines changed

6 files changed

+183
-36
lines changed

.travis.yml

+23-22
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,34 @@ sudo: false
33

44
cache:
55
directories:
6-
- "$HOME/.m2"
6+
- "$HOME/.m2"
77

88
jobs:
99
include:
10-
# 1.1 Semver check
11-
- stage: test
12-
jdk: openjdk8
13-
script: mvn verify -Pcheck-semantic-version -DskipTests=true -DskipITs=true
14-
env: CHECK_SEMANTIC_VERSION=true
10+
# 1.1 Semver check
11+
- stage: test
12+
jdk: openjdk11
13+
script: mvn verify -Pcheck-semantic-version -DskipTests=true -DskipITs=true
14+
env: CHECK_SEMANTIC_VERSION=true
1515

16-
# 1.2 Check JDK 8,10,ea
17-
- stage: test
18-
jdk: openjdk8
19-
script: mvn clean verify
20-
after_success:
21-
- mvn clean jacoco:prepare-agent test jacoco:report coveralls:report
22-
- jdk: openjdk10
23-
script: mvn -q verify
24-
- jdk: openjdk11
25-
script: mvn -q verify
16+
# 1.2 Tests
17+
- stage: test
18+
jdk: openjdk11
19+
script: mvn verify
20+
env: VERIFY=true
2621

27-
# 1.3 Check javadoc. We need to use this version to properly detect errors.
28-
- jdk: oraclejdk11
29-
env: JAVADOC=true
30-
script:
31-
- mvn javadoc:jar
22+
# 1.3 Coverage
23+
- stage: test
24+
jdk: openjdk11
25+
script: mvn jacoco:prepare-agent test jacoco:report coveralls:report
26+
env: COVERAGE=true
27+
28+
# 1.4 Javadoc
29+
- jdk: openjdk11
30+
env: JAVADOC=true
31+
script:
32+
- mvn javadoc:jar
3233

3334
branches:
3435
only:
35-
- master
36+
- master

archetype/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<artifactId>cucumber-archetype</artifactId>
1313
<packaging>maven-archetype</packaging>
14-
<name>cucumber-archetype</name>
14+
<name>Cucumber JVM: Archetype</name>
1515
<description>Cucumber JVM: Maven Archetype</description>
1616

1717
<!-- Not used by this module, but used by the integration tests of

junit-platform-engine/pom.xml

+19-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<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">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23
<modelVersion>4.0.0</modelVersion>
34

45
<parent>
@@ -11,10 +12,6 @@
1112
<packaging>jar</packaging>
1213
<name>Cucumber-JVM: JUnit Platform Engine</name>
1314

14-
<properties>
15-
<project.Automatic-Module-Name>io.cucumber.junit.platform.engine</project.Automatic-Module-Name>
16-
</properties>
17-
1815
<profiles>
1916
<profile>
2017
<!-- IDEA doesn't calculate shaded dependencies correctly and tries
@@ -83,4 +80,21 @@
8380
</dependency>
8481
</dependencies>
8582

83+
<build>
84+
<plugins>
85+
<plugin>
86+
<groupId>org.apache.maven.plugins</groupId>
87+
<artifactId>maven-jar-plugin</artifactId>
88+
<configuration combine.self="override">
89+
<!-- Ignore Automatic module name -->
90+
<archive>
91+
<manifestEntries>
92+
<Multi-Release>true</Multi-Release>
93+
</manifestEntries>
94+
</archive>
95+
</configuration>
96+
</plugin>
97+
</plugins>
98+
</build>
99+
86100
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module io.cucumber.junit.platform.engine {
2+
requires org.opentest4j;
3+
requires org.junit.platform.commons;
4+
requires transitive org.apiguardian.api;
5+
6+
requires io.cucumber.core;
7+
8+
requires transitive org.junit.platform.engine;
9+
10+
exports io.cucumber.junit.platform.engine;
11+
12+
provides org.junit.platform.engine.TestEngine with io.cucumber.junit.platform.engine.CucumberTestEngine;
13+
14+
}

openejb/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474

7575
<!--
7676
Using source level 1.7 in combination with openejb-core results in 'An unknown compilation
77-
error'. Use 1.6 instead and compile up to 1.7 to avoid this problem.
77+
error'. Use 1.6 instead and compile up to avoid this problem.
7878
-->
7979
<build>
8080
<plugins>

pom.xml

+125-7
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,15 @@
3939

4040

4141
<properties>
42+
<!-- Tool chains, ect -->
43+
<base.java.version>1.8</base.java.version>
44+
<javadoc.java.version>8</javadoc.java.version>
45+
<toolchain.vendor>openjdk</toolchain.vendor>
46+
<toolchain.java.version>11</toolchain.java.version>
47+
4248
<!--Semantic version -->
4349
<apiguardian-api.version>1.1.0</apiguardian-api.version>
50+
4451
<!--Dependencies -->
4552
<cucumber-expressions.version>8.3.1</cucumber-expressions.version>
4653
<datatable.version>3.2.0</datatable.version>
@@ -266,13 +273,54 @@
266273
</execution>
267274
</executions>
268275
</plugin>
269-
270276
</plugins>
271277
</build>
272278
</profile>
273279
</profiles>
274280

275281
<build>
282+
<plugins>
283+
<plugin>
284+
<groupId>org.apache.maven.plugins</groupId>
285+
<artifactId>maven-toolchains-plugin</artifactId>
286+
<executions>
287+
<execution>
288+
<goals>
289+
<goal>toolchain</goal>
290+
</goals>
291+
</execution>
292+
</executions>
293+
<configuration>
294+
<toolchains>
295+
<jdk>
296+
<version>${toolchain.java.version}</version>
297+
<vendor>${toolchain.vendor}</vendor>
298+
</jdk>
299+
</toolchains>
300+
</configuration>
301+
</plugin>
302+
303+
<!-- enable Java 9,10,11 compilation -->
304+
<plugin>
305+
<groupId>org.apache.maven.plugins</groupId>
306+
<artifactId>maven-compiler-plugin</artifactId>
307+
<executions>
308+
<execution>
309+
<id>java9</id>
310+
<phase>compile</phase>
311+
</execution>
312+
<execution>
313+
<id>java10</id>
314+
<phase>compile</phase>
315+
</execution>
316+
<execution>
317+
<id>java11</id>
318+
<phase>compile</phase>
319+
</execution>
320+
</executions>
321+
</plugin>
322+
</plugins>
323+
276324
<pluginManagement>
277325
<plugins>
278326
<!-- Standard plugins - alphabetically -->
@@ -303,21 +351,85 @@
303351
</dependencies>
304352
</plugin>
305353

354+
<plugin>
355+
<groupId>org.apache.maven.plugins</groupId>
356+
<artifactId>maven-compiler-plugin</artifactId>
357+
<configuration>
358+
<source>${base.java.version}</source>
359+
<target>${base.java.version}</target>
360+
</configuration>
361+
<executions>
362+
<!-- for Java 9 -->
363+
<execution>
364+
<id>java9</id>
365+
<phase>none</phase>
366+
<goals>
367+
<goal>compile</goal>
368+
</goals>
369+
<configuration>
370+
<release>9</release>
371+
<jdkToolchain>
372+
<version>9</version>
373+
</jdkToolchain>
374+
<compileSourceRoots>
375+
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
376+
</compileSourceRoots>
377+
<multiReleaseOutput>true</multiReleaseOutput>
378+
</configuration>
379+
</execution>
380+
381+
<!-- for Java 10 -->
382+
<execution>
383+
<id>java10</id>
384+
<phase>none</phase>
385+
<goals>
386+
<goal>compile</goal>
387+
</goals>
388+
<configuration>
389+
<release>10</release>
390+
<jdkToolchain>
391+
<version>10</version>
392+
</jdkToolchain>
393+
<compileSourceRoots>
394+
<compileSourceRoot>${project.basedir}/src/main/java10</compileSourceRoot>
395+
</compileSourceRoots>
396+
<multiReleaseOutput>true</multiReleaseOutput>
397+
</configuration>
398+
</execution>
399+
400+
<!-- for Java 11 -->
401+
<execution>
402+
<id>java11</id>
403+
<phase>none</phase>
404+
<goals>
405+
<goal>compile</goal>
406+
</goals>
407+
<configuration>
408+
<release>11</release>
409+
<jdkToolchain>
410+
<version>11</version>
411+
</jdkToolchain>
412+
<compileSourceRoots>
413+
<compileSourceRoot>${project.basedir}/src/main/java11</compileSourceRoot>
414+
</compileSourceRoots>
415+
<multiReleaseOutput>true</multiReleaseOutput>
416+
</configuration>
417+
</execution>
418+
</executions>
419+
</plugin>
420+
306421
<plugin>
307422
<groupId>org.apache.maven.plugins</groupId>
308423
<artifactId>maven-javadoc-plugin</artifactId>
309424
<configuration>
310-
<use>false</use>
311-
<doclint>none</doclint>
312-
<source>8</source>
425+
<source>${javadoc.java.version}</source>
313426
<excludePackageNames>io.cucumber.examples:org.springframework</excludePackageNames>
314427
<links>
315-
<link>http://docs.oracle.com/javase/8/docs/api/</link>
316428
<link>https://junit.org/junit4/javadoc/latest/</link>
317429
<!-- javadoc plugin can't port docs for modularized code to
318-
non-modularized code -->
430+
non-modularized code -->
319431
<!-- <link>https://junit.org/junit5/docs/current/api/</link>-->
320-
<link>https://javadoc.io/doc/org.testng/testng/7.0.0/</link>
432+
<link>https://javadoc.io/doc/org.testng/testng/7.1.0/</link>
321433
</links>
322434
<groups>
323435
<group>
@@ -359,6 +471,12 @@
359471
<version>3.0.0</version>
360472
</plugin>
361473

474+
<plugin>
475+
<groupId>org.apache.maven.plugins</groupId>
476+
<artifactId>maven-toolchains-plugin</artifactId>
477+
<version>1.1</version>
478+
</plugin>
479+
362480
<!-- Semantic version check -->
363481
<plugin>
364482
<groupId>org.revapi</groupId>

0 commit comments

Comments
 (0)