Skip to content

Commit

Permalink
Remove the use of the maven-toolchains-plugin (#2595)
Browse files Browse the repository at this point in the history
To benefit from GitHubs release automation[1] Cucumber should be able to be
build on an arbitrary jdk docker image. Typically, these do not provide Maven
tool chain configurations.

Instead of going through the effort of setting this up in the
cucumber/action-publish-mvn we can forge the use of toolchains, simplifying
the build process somewhat.

To ensure Cucumber is not build with a JDK version less than 11, the enforcer
plugin will check this now.

Additionally:
 - Allow spotless and revapi to work in sub modules
 - Use surefire and failsafe 3.0.0-M7 everywhere
 - Fix example parent pom versions

1: https://github.com/cucumber/action-publish-mvn
  • Loading branch information
mpkorstanje committed Jul 31, 2022
1 parent 40af8e6 commit 1ccc09f
Show file tree
Hide file tree
Showing 14 changed files with 100 additions and 125 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/.toolchains.xml

This file was deleted.

16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
with:
version: '11'
- name: Install dependencies
run: mvn install -DskipTests=true -DskipITs=true -Darchetype.test.skip=true -Dmaven.javadoc.skip=true -B --show-version --toolchains .github/workflows/.toolchains.xml
run: mvn install -DskipTests=true -DskipITs=true -Darchetype.test.skip=true -Dmaven.javadoc.skip=true -B --show-version
- name: Test
run: mvn verify --toolchains .github/workflows/.toolchains.xml
run: mvn verify
env:
CUCUMBER_PUBLISH_TOKEN: ${{ secrets.CUCUMBER_PUBLISH_TOKEN }}

Expand All @@ -54,9 +54,9 @@ jobs:
with:
version: '11'
- name: Install dependencies
run: mvn install -DskipTests=true -DskipITs=true -Darchetype.test.skip=true -Dmaven.javadoc.skip=true --batch-mode --show-version --toolchains .github/workflows/.toolchains.xml
run: mvn install -DskipTests=true -DskipITs=true -Darchetype.test.skip=true -Dmaven.javadoc.skip=true --batch-mode --show-version
- name: Javadoc
run: mvn javadoc:jar --toolchains .github/workflows/.toolchains.xml
run: mvn javadoc:jar

coverage:
name: 'Coverage'
Expand All @@ -75,9 +75,9 @@ jobs:
with:
version: '11'
- name: Install dependencies
run: mvn install -DskipTests=true -DskipITs=true -Darchetype.test.skip=true -Dmaven.javadoc.skip=true --batch-mode --show-version --toolchains .github/workflows/.toolchains.xml
run: mvn install -DskipTests=true -DskipITs=true -Darchetype.test.skip=true -Dmaven.javadoc.skip=true --batch-mode --show-version
- name: Test (Coverage)
run: mvn jacoco:prepare-agent verify jacoco:report --toolchains .github/workflows/.toolchains.xml
run: mvn jacoco:prepare-agent verify jacoco:report
- uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
Expand All @@ -101,6 +101,6 @@ jobs:
with:
version: '11'
- name: Install dependencies
run: mvn install -DskipTests=true -DskipITs=true -Darchetype.test.skip=true -Dmaven.javadoc.skip=true --batch-mode --show-version --toolchains .github/workflows/.toolchains.xml
run: mvn install -DskipTests=true -DskipITs=true -Darchetype.test.skip=true -Dmaven.javadoc.skip=true --batch-mode --show-version
- name: Test (Semver check)
run: mvn verify -Pcheck-semantic-version -DskipTests=true -DskipITs=true -Darchetype.test.skip=true --toolchains .github/workflows/.toolchains.xml
run: mvn verify -Pcheck-semantic-version -DskipTests=true -DskipITs=true -Darchetype.test.skip=true
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ We appreciate that. Do keep the following in mind:

## Formatting Java

To automatically format the java source code run
The source code is formatted automatically by spotless when running:

```
mvn initialize spotless:apply
mvn install
```

To configure Intelij IDEA/Eclipse use the configuration files in `.spotless/`.
Expand Down
2 changes: 1 addition & 1 deletion examples/calculator-java-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-examples</artifactId>
<version>7.5.0-SNAPSHOT</version>
<version>7.5.1-SNAPSHOT</version>
</parent>

<artifactId>calculator-java-cli</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/calculator-java-junit4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-examples</artifactId>
<version>7.5.0-SNAPSHOT</version>
<version>7.5.1-SNAPSHOT</version>
</parent>

<artifactId>calculator-java-junit4</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/calculator-java-junit5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-examples</artifactId>
<version>7.5.0-SNAPSHOT</version>
<version>7.5.1-SNAPSHOT</version>
</parent>

<artifactId>calculator-java-junit5</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/calculator-java-testng/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-examples</artifactId>
<version>7.5.0-SNAPSHOT</version>
<version>7.5.1-SNAPSHOT</version>
</parent>

<artifactId>calculator-java-testng</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/calculator-java8-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-examples</artifactId>
<version>7.5.0-SNAPSHOT</version>
<version>7.5.1-SNAPSHOT</version>
</parent>

<artifactId>calculator-java8-cli</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-jvm</artifactId>
<version>7.5.0-SNAPSHOT</version>
<version>7.5.1-SNAPSHOT</version>
</parent>

<artifactId>cucumber-examples</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/spring-java-junit5/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-examples</artifactId>
<version>7.5.0-SNAPSHOT</version>
<version>7.5.1-SNAPSHOT</version>
</parent>

<artifactId>spring-java-junit5</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/wicket-java-junit4/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-examples</artifactId>
<version>7.5.0-SNAPSHOT</version>
<version>7.5.1-SNAPSHOT</version>
</parent>
<artifactId>wicket-java-junit4</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion examples/wicket-java-junit4/wicket-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>io.cucumber</groupId>
<artifactId>wicket-java-junit4</artifactId>
<version>7.5.0-SNAPSHOT</version>
<version>7.5.1-SNAPSHOT</version>
</parent>
<artifactId>wicket-main</artifactId>
<name>Examples: Wicket application</name>
Expand Down
2 changes: 1 addition & 1 deletion examples/wicket-java-junit4/wicket-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>io.cucumber</groupId>
<artifactId>wicket-java-junit4</artifactId>
<version>7.5.0-SNAPSHOT</version>
<version>7.5.1-SNAPSHOT</version>
</parent>
<artifactId>wicket-test</artifactId>
<name>Examples: Wicket application tested with Selenium</name>
Expand Down
Loading

0 comments on commit 1ccc09f

Please sign in to comment.