Skip to content

[10.0] build: improve build/maven consistency / bump github actions#9317

Merged
headius merged 7 commits intojruby:jruby-10.0from
chadlwilson:jruby-10.0-mvnw-consistency
Mar 28, 2026
Merged

[10.0] build: improve build/maven consistency / bump github actions#9317
headius merged 7 commits intojruby:jruby-10.0from
chadlwilson:jruby-10.0-mvnw-consistency

Conversation

@chadlwilson
Copy link
Copy Markdown
Contributor

@chadlwilson chadlwilson commented Mar 17, 2026

Cleans up the build process for improved consistency:

Build

  • changes to use ./mvnw everywhere, rather than mix-and-matching "maven version installed on github actions default runner" with "maven version implied by wrapper" and "maven version I have installed locally"
  • uses --no-transfer-progress/-ntp consistently rather than mixing with --batch-mode/-B in some places.
  • removes some ancient travis and ant/ivy scripting

GitHub Actions

  • upgrades github actions versions to latest
    • locking specific actions hashes is considered better practice for supply chain paranoia and reproducibility, however we'd need dependabot/renovate automation to make that maintainable, and it's partially moot if the release build isn't produced off GitHub Actions, and thus likely not reproducible.
  • removes useless/json-schema-violating strategy without matrix
  • (for discussion!) changes the reusable publish-snapshots.yml workflow to run with the version implied by the repo and branch/revision the actions are running on rather than locking to some jruby/jruby revision
    • its a bit confusing to use a version of one workflow implied by a completely different commit to the caller. When reusing workflows inside the same repo; I believe it's generally more canonical to use whichever version is defined by the current checked actions. Doing it this way makes it easier to
    • test/refactor/sanity test these actions on ones own fork
    • review all the workflow yaml that will be run alongside each other
    • in future, avoid needing to pass in things like the javaLevel - each branch can define its targets/matrix independently in its workflows.
    • the build process becomes more consistently source controlled alongside the source being built (except for defining GHA schedules which only apply off master).

Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
It's not great practice to be mix+matching mvn and mvnw; since it risks inconsistency. When Maven 4 comes out this practice will cause headaches :-)

Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
Don't think it's necessary to lock these independently; they can probably just use the version implied by the source control version.

Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
Signed-off-by: Chad Wilson <29788154+chadlwilson@users.noreply.github.com>
@chadlwilson chadlwilson changed the base branch from master to jruby-10.0 March 17, 2026 09:21
Copy link
Copy Markdown
Member

@headius headius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I must admit I find the ./mvnw everywhere to be a bit verbose but the consistent build behavior is worth it.

@headius
Copy link
Copy Markdown
Member

headius commented Mar 28, 2026

An exercise for another time would be to further reduce duplication between these jobs. Most of these jobs have only a few lines of difference.

@chadlwilson
Copy link
Copy Markdown
Contributor Author

Looks good. I must admit I find the ./mvnw everywhere to be a bit verbose but the consistent build behavior is worth it.

Yeah, I'm in two minds myself about the value of the wrappers (and needing to upgrade them) however having two approaches undermines it.

So seems better to me to use mvn everywhere or the wrappers everywhere.

@headius headius merged commit 83dc1e7 into jruby:jruby-10.0 Mar 28, 2026
106 checks passed
@chadlwilson chadlwilson deleted the jruby-10.0-mvnw-consistency branch March 28, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants