Build improvements
I noticed that the project doesn't have a CI configuration.
I think it would help contributors' experience to have one, so this PR:
- Adds the latest Maven Wrapper, configured with Maven 3.9.9
mvn org.apache.maven.plugins:maven-wrapper-plugin:3.3.2:wrapper -Dmaven=3.9.9 - Upgrade all dependencies to the latest version
- Declare common plugins in the
pluginManagementsection and upgrade all plugins to the latest version - Adds Dependabot to automate dependency and plugin upgrades
- Adds a GitHub Actions job with Java 21 (latest LTS - see an execution example here)
- Adds a Maven release profile to isolate the execution of the
maven-gpg-pluginandnexus-staging-maven-pluginplugins
Thanks @scordio ! A question here: Is the mvnw and the batch script generated by something else?
Yes, they're generated by the following execution:
mvn org.apache.maven.plugins:maven-wrapper-plugin:3.3.2:wrapper -Dmaven=3.9.9
Feel free to drop mine and regenerate them, just to reconfirm that there are no customizations 🙂
Should these generated scripts be committed into version control?
Yes, they are usually committed especially to be used in the CI jobs or locally, so that the project locks in the Maven version to be used and doesn't depend on the running environment.
@ctongfei I noticed you changed the base branch, so I rebased the PR accordingly 👍
Hi @ctongfei, in case there is something I should adjust further, feel free to let me know!
Sorry for not being active on this. I'll check if this interferes with how I publish these to Maven. If it works properly I'll merge
No worries!
Have you considered automating the release process via GitHub Actions? In case you're interested, I'd be happy to raise a separate MR for it (along the lines of release.yml).
What's worth mentioning is that nexus-staging-maven-plugin is no longer the way to publish to Maven Central, and the Central Publisher Portal should be used instead via the central-publishing-maven-plugin.
A simple example where I've migrated to it is at https://github.com/assertj/assertj-generator/pull/273.