Skip to content

Build and deploy through the wrapper on Jenkins - #12677

Merged
slachiewicz merged 1 commit into
apache:maven-4.0.xfrom
slachiewicz:jenkins-wrapper-build
Aug 4, 2026
Merged

Build and deploy through the wrapper on Jenkins#12677
slachiewicz merged 1 commit into
apache:maven-4.0.xfrom
slachiewicz:jenkins-wrapper-build

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Aug 4, 2026

Copy link
Copy Markdown
Member

Jenkins already provisions Maven with the wrapper for the build itself, but the deploy step still ran the mvn from the maven_3_latest Jenkins tool — so a release was published by a different Maven than the one that built it. mavenBuild runs first in the same workspace, so ./mvnw is present by the time deploy runs.

Also moves the wrapper provisioning to maven-wrapper-plugin 3.3.4 and Maven 3.9.12, matching what .github/workflows/maven.yml already uses. Both are on Central (verified).

Same pattern as apache/maven-jenkins-lib#22, which applies it to the shared library. Part of #12676.

No master companion is needed: master already has both of these — ./mvnw clean deploy -DdeployAtEnd=true -B -V at Jenkinsfile:41 and maven-wrapper-plugin:3.3.4 with -Dmaven=3.9.12 at :70. This brings maven-4.0.x up to the same state.

Jenkins already provisions Maven with the wrapper for the build itself, but
the deploy step still ran the `mvn` from the `maven_3_latest` Jenkins tool,
so a release was published by a different Maven than the one that built it.
`mavenBuild` runs first in the same workspace, so `./mvnw` is present by the
time deploy runs.

Also moves the wrapper provisioning to maven-wrapper-plugin 3.3.4 and Maven
3.9.12, matching what the GitHub Actions workflow already uses.

This is the same pattern as apache/maven-jenkins-lib#22, which applies it to
the shared library.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM ✅ — Clean, low-risk change that aligns the Jenkins deploy step with the build step by using the Maven wrapper consistently.

Key observations:

  • The build step already provisions the wrapper via maven-wrapper-plugin, so ./mvnw is guaranteed to be present when the deploy step runs.
  • The version bumps (wrapper-plugin 3.3.2→3.3.4, Maven 3.9.10→3.9.12) match what origin/master and the GHA workflow already use.
  • Previously the build used ./mvnw (Maven 3.9.x) but the deploy used mvn from the maven_3_latest Jenkins tool — potentially a different version. This PR fixes that inconsistency.
  • The added -V flag improves version traceability in deploy logs.
  • Note: origin/master already has identical changes (commits a9fda7d28f and e25ec15e1b), so a companion PR for master is not needed.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of gnodet

@slachiewicz
slachiewicz merged commit 6b56177 into apache:maven-4.0.x Aug 4, 2026
41 of 42 checks passed
@slachiewicz
slachiewicz deleted the jenkins-wrapper-build branch August 4, 2026 13:18
@github-actions github-actions Bot added this to the 4.0.0-rc-7 milestone Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants