cucumber-jvm
cucumber-jvm copied to clipboard
The project should be possible to build without prior knowledge ..
The project should be possible to build without prior knowledge about necessary maven goals. In a Java developers environment conflicts with dependencies on other Java/Maven projects should be avoided.
- Introduce a variable to specify the required minimum maven version .. The variable is configured to a version which is assumed to be neither too old nor too new and is preferably API compatible to "modern maven-plugins".
- Configure an isolated local Maven repository cache using the maven -s option in .mvn/maven.config (Since maven 3.3.1+) - see https://maven.apache.org/configure.html
- Configure a project-specific settings(...).xml with minimum requirements - this is where the localRepository element points to an isolated local repository. There is no need to create the repository path manually ( this is done by maven).
- .... After cloning the project entering 'mvn' should build it without any further arguments.
🤔 What's changed?
- Add .mvn/maven.config ... points to the next file:
- Add .mvn/settings-cucumber-jvm.xml
- Change root pom.xml .. manage version of the enforcer plugin (3.0.0) and enforce mimimum maven version 3.5.4 (from 2018) it should work with 3.3.1 too
⚡️ What's your motivation?
When I first started working on the project there were conflicts with the state of my local repository as the cucumber project did not have any minimum requirements. The unmanaged enforcer plugin was not API compatible with my newer maven version. It should be as easy as possible for newcomers to the project to build the project even without prior knowledge.
Since I do not have knowledge about the CI of the project perhaps the following adjustments are still necessary:
The CI should either configure its settings-cucumber-ci.xml (??) explicitly via maven option -s or it might be possible to use profiles within a single settings.xml. I would recommend the first option.
Codecov Report
Merging #2554 (9944440) into main (bb547d3) will not change coverage. The diff coverage is
n/a.
@@ Coverage Diff @@
## main #2554 +/- ##
=========================================
Coverage 84.54% 84.54%
Complexity 2661 2661
=========================================
Files 310 310
Lines 9356 9356
Branches 901 901
=========================================
Hits 7910 7910
Misses 1115 1115
Partials 331 331
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update bb547d3...9944440. Read the comment docs.
The unmanaged enforcer plugin was not API compatible with my newer maven version.
Comes to mind that rather then fixing this project we can provide users with a Maven wrapper instead. However this will result in binaries in git (impossible to review) and would have to be backed up with a Github action to verify the Maven wrapper integrity.
The CI is github actions based. You can find the CI files here:
https://github.com/cucumber/cucumber-jvm/blob/main/.github/workflows/build.yml
This need not be addressed in this PR.
I've cherry picked the non-controversial changes to main just to get those out of the way.