progressbar icon indicating copy to clipboard operation
progressbar copied to clipboard

Build improvements

Open scordio opened this issue 7 months ago • 8 comments

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 pluginManagement section 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-plugin and nexus-staging-maven-plugin plugins

scordio avatar May 30 '25 14:05 scordio

Thanks @scordio ! A question here: Is the mvnw and the batch script generated by something else?

ctongfei avatar May 31 '25 07:05 ctongfei

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 🙂

scordio avatar May 31 '25 07:05 scordio

Should these generated scripts be committed into version control?

ctongfei avatar May 31 '25 07:05 ctongfei

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.

scordio avatar May 31 '25 07:05 scordio

@ctongfei I noticed you changed the base branch, so I rebased the PR accordingly 👍

scordio avatar Jun 01 '25 15:06 scordio

Hi @ctongfei, in case there is something I should adjust further, feel free to let me know!

scordio avatar Aug 21 '25 16:08 scordio

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

ctongfei avatar Sep 24 '25 23:09 ctongfei

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.

scordio avatar Sep 25 '25 04:09 scordio