luhsra / MinimaxSimulator

Platform independent GUI-based Minimax simulator
https://luhsra.github.io/MinimaxSimulator/
MIT License
7 stars 5 forks source link

Question: minimum version of maven is not defined - 3.0.5 or 3.3.9 #47

Closed AiyionPrime closed 1 year ago

AiyionPrime commented 3 years ago

The Simulator does not define a minimum version of maven, which might break the build process for you in the future.

Either just set it to a fixed version for now, where I'd recommend 3.3.9 due to your use of the plugin org.jacoco:jacoco-maven-plugin, which could be updated to version 0.8.6.

Currently you state maven 3.0.5 as prerequisite in the readme.

If you'd decide on which version you'd want you'd help a lot in getting rid of those Error messages during the build phase diagnostic targets in recent maven versions.

prohde commented 3 years ago

So you suggest the use of this rule: https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html?

I am currently on version 3.6.3 and only got the warning you mentioned in #48 (as far as I noticed).

AiyionPrime commented 3 years ago

Yes, the enforcer plugin seems to be a well suited option. Since I built maven projects on a regular basis, it has been a while; I thought there was some more native approach like a oneliner in the pom-xml, but I can't come up with it.

Anyway, on any maven 3 version you should be able to reproduce the error as soon as you hit some diagnostic targets like mvn versions:display-plugin-updates

Which does propose the enforcer plugin as well... Give me a few minutes.

AiyionPrime commented 3 years ago

I just tried using 3.0.5 it compiles and all tests work, but the mvn:versions:[...] command does drop this:

[ERROR] Project requires an incorrect minimum version of Maven. [ERROR] Update the pom.xml to contain maven-enforcer-plugin to [ERROR] force the Maven version which is needed to build this project. [ERROR] See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html [ERROR] Using the minimum version of Maven: 3.0.5

But this might just be my system, as I'm using maven 3.6.3 as well. I'll provide a PR for 3.0.5 for now but do still recommend the usage of 3.3.9.

AiyionPrime commented 3 years ago

The draft is done; as soon as the original question is answered, I'll update or finish it accordingly.