Skip to content

fix(deps): Replace ${revision} with ${project.version} in artifacts path#352

Open
hingu-8103 wants to merge 1 commit into
apache:masterfrom
hingu-8103:feat#351
Open

fix(deps): Replace ${revision} with ${project.version} in artifacts path#352
hingu-8103 wants to merge 1 commit into
apache:masterfrom
hingu-8103:feat#351

Conversation

@hingu-8103

Copy link
Copy Markdown

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

1 participant