Skip to content

fix: replace revision with ${project.version} in artifacts path#352

Merged
imbajin merged 1 commit into
apache:masterfrom
hingu-8103:feat#351
Jul 12, 2026
Merged

fix: replace revision with ${project.version} in artifacts path#352
imbajin merged 1 commit into
apache:masterfrom
hingu-8103:feat#351

Conversation

@hingu-8103

Copy link
Copy Markdown
Contributor

Purpose of the PR

The root POM uses ${revision} as the version property. However, two files reference ${revision} directly in file path strings and <finalName> When mvn versions:set -DnewVersion=X.Y.Z is run, it updates <version> tags and occurences of ${version} with newVersion but not in the strings and <finalName>— causing the copy tasks to look for JARs with the old version in their filename, breaking the build.

Main Changes

  1. computer/computer-dist/pom.xml:

    • Line 67, 75: Replace ${revision} with ${project.version} in <copy> task file path attributes
    • These paths reference JAR files copied during the distribution packaging phase
    • Using ${project.version} ensures paths always match the actual artifact version
  2. computer/computer-k8s-operator/pom.xml:

    • Line 39: Replace ${revision} with ${project.version} in <finalName> declaration
    • This ensures the output JAR filename matches the actual project version

Why This Fix Works

  • ${project.version} is dynamically resolved from the <version> tag
  • When mvn versions:set updates the <version> tag, ${project.version} automatically reflects the new version
  • File paths and artifact names will always be consistent with the actual built version

Verifying these changes

  • Trivial rework / code cleanup without any test coverage. (No Need)
  • Already covered by existing tests, such as (please modify tests here).
  • Need tests and can be verified as follows.

Manual testing

  • Build with mvn clean package -DskipTests succeeds

  • Artifact filenames match the actual project version

  • Can be tested with version update: mvn versions:set -DnewVersion=1.8.0-test && mvn clean package -DskipTests

Does this PR potentially affect the following parts?

  • Nope
  • Dependencies (add/update license info)
  • Modify configurations
  • The public API
  • Other affects (typed here)

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - No Need

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 11, 2026

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Blocking: no. Summary: The effective-version substitutions are consistent with the generated artifact names, and no actionable issue was found. Evidence: JDK 11 package builds succeeded for the default version, -Drevision=1.7.0-review, and versions:set -DnewVersion=1.8.0-test; both expected JARs were present in the distribution archive.

@VGalaxies VGalaxies 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.

No actionable findings.

Verified git diff --check origin/master...HEAD; isolated mvn versions:set -DnewVersion=1.8.0-review; JDK 11 mvn clean package -pl computer-dist -am -DskipTests -Dmaven.javadoc.skip=true -ntp completed with BUILD SUCCESS; packaged JAR checksums matched their source artifacts.

@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jul 12, 2026
@imbajin imbajin changed the title fix(deps): Replace ${revision} with ${project.version} in artifacts path fix: replace revision with ${project.version} in artifacts path Jul 12, 2026
@imbajin imbajin merged commit 7caae10 into apache:master Jul 12, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improve] Replace ${revision} with ${project.version} in artifact paths

3 participants