Skip to content

ci: avoid resolution of downstream project current version#2417

Closed
rsynek wants to merge 3 commits into
mainfrom
ci/downstream-avoid-resolution
Closed

ci: avoid resolution of downstream project current version#2417
rsynek wants to merge 3 commits into
mainfrom
ci/downstream-avoid-resolution

Conversation

@rsynek

@rsynek rsynek commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Replace Maven command with sed to update parent version in pom.xml.

Replace Maven command with sed to update parent version in pom.xml.

@triceo triceo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We shall see.

Copilot AI 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.

Pull request overview

This PR updates the downstream build GitHub Actions workflow to avoid invoking Maven’s versions:update-parent goal (and its associated version resolution behavior) by directly rewriting the downstream pom.xml parent version before running the downstream build.

Changes:

  • Replace mvn versions:update-parent ... with a sed-based edit of the <parent> <version> in the downstream pom.xml.
  • Keep the downstream build step running mvn -B clean verify after the parent version update.

Comment thread .github/workflows/downstream_build.yml Outdated
Comment thread .github/workflows/downstream_build.yml Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/downstream_build.yml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI 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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

TIMEFOLD_LICENSE: ${{ secrets.TIMEFOLD_SOLVER_CI_PROD_LICENSE }}
run: |
mvn versions:update-parent -DskipResolution=true -DallowSnapshots=true -DparentVersion=999-SNAPSHOT
awk '/<parent>/{inParent=1} /<\/parent>/{inParent=0} inParent && /<version>/{if (sub(/<version>[^<]*<\/version>/,"<version>999-SNAPSHOT</version>")) replaced=1} {print} END{exit !replaced}' pom.xml > pom.xml.tmp && mv pom.xml.tmp pom.xml
TIMEFOLD_LICENSE: ${{ secrets.TIMEFOLD_SOLVER_CI_PROD_LICENSE }}
run: |
mvn versions:update-parent -DskipResolution=true -DallowSnapshots=true -DparentVersion=999-SNAPSHOT
awk '/<parent>/{inParent=1} /<\/parent>/{inParent=0} inParent && /<version>/{if (sub(/<version>[^<]*<\/version>/,"<version>999-SNAPSHOT</version>")) replaced=1} {print} END{exit !replaced}' pom.xml > pom.xml.tmp && mv pom.xml.tmp pom.xml
@sonarqubecloud

Copy link
Copy Markdown

@rsynek rsynek closed this Jun 25, 2026
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.

3 participants