Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 9, 2025

Description

Maven release/perform phase failed because maven-gpg-plugin and central-publishing-maven-plugin referenced undefined properties ${maven-gpg-plugin.version} and ${central-publishing-maven-plugin.version}, causing Maven to treat them as literal strings rather than version numbers.

Changes

Added missing property definitions to root pom.xml:

  • maven-gpg-plugin.version=3.2.8
  • central-publishing-maven-plugin.version=0.9.0

Checklist:

  • Public methods are documented
  • Public methods are tested
  • New and existing tests pass when run locally
  • There are no new warnings or errors
Original prompt

Background

A recent GitHub Actions run for BerryCloud/xapi-java (job id 57547711761) failed during the release/perform phase. Key errors in the job logs show Maven cannot resolve plugin versions defined as properties in the root pom.xml:

  • 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-gpg-plugin must be a valid version but is '${maven-gpg-plugin.version}'. @ line 146, column 22
  • 'build.plugins.plugin.version' for org.sonatype.central:central-publishing-maven-plugin must be a valid version but is '${central-publishing-maven-plugin.version}'. @ line 198, column 22
  • Unresolveable build extension: org.sonatype.central:central-publishing-maven-plugin:${central-publishing-maven-plugin.version}

These errors cause Maven to abort with "Maven execution failed" and the workflow exits with code 1.

Files and ref

Goal

Create a pull request that fixes the root pom.xml so plugin version properties resolve to concrete versions and the release perform build can proceed in CI.

Proposed change

  1. Add explicit properties for the missing plugin versions into the section of the root pom.xml. Suggested values (these are valid, commonly-used versions):

<maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
<central-publishing-maven-plugin.version>1.0.0</central-publishing-maven-plugin.version>

  1. Keep the rest of the POM intact; the existing pluginManagement block already references the properties:
  • maven-gpg-plugin uses ${maven-gpg-plugin.version} at line ~146
  • central-publishing-maven-plugin uses ${central-publishing-maven-plugin.version} at line ~198
  1. Add a short comment above the properties to explain why they are present (resolves CI release plugin resolution errors).

Exact patch (context):

In pom.xml, find the block and add the following lines (placement after existing properties is OK):

<maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
<central-publishing-maven-plugin.version>1.0.0</central-publishing-maven-plugin.version>

Notes and rationale

  • The root cause is unresolved property placeholders used as plugin versions; adding concrete versions fixes plugin resolution in Maven and allows the release plugin and central publishing extension to be downloaded.
  • If you prefer different versions for the central publishing plugin, update the property value accordingly. Verify the chosen version exists in Maven Central.
  • After the PR is created, run the release workflow again to verify the failure is resolved. If additional plugin versions are missing, add them similarly.

Please create a branch, apply the change to pom.xml at ref 00bd100, and open a pull request with a short description referencing the failing job (job id 57547711761) and this change.

Testing

  • CI should re-run on the PR. The expected result: Maven moves past the plugin resolution errors and proceeds with release:perform.

References

Do not include any other file changes in this PR.

This pull request was created as a result of the following prompt from Copilot chat.

Background

A recent GitHub Actions run for BerryCloud/xapi-java (job id 57547711761) failed during the release/perform phase. Key errors in the job logs show Maven cannot resolve plugin versions defined as properties in the root pom.xml:

  • 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-gpg-plugin must be a valid version but is '${maven-gpg-plugin.version}'. @ line 146, column 22
  • 'build.plugins.plugin.version' for org.sonatype.central:central-publishing-maven-plugin must be a valid version but is '${central-publishing-maven-plugin.version}'. @ line 198, column 22
  • Unresolveable build extension: org.sonatype.central:central-publishing-maven-plugin:${central-publishing-maven-plugin.version}

These errors cause Maven to abort with "Maven execution failed" and the workflow exits with code 1.

Files and ref

Goal

Create a pull request that fixes the root pom.xml so plugin version properties resolve to concrete versions and the release perform build can proceed in CI.

Proposed change

  1. Add explicit properties for the missing plugin versions into the section of the root pom.xml. Suggested values (these are valid, commonly-used versions):

<maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
<central-publishing-maven-plugin.version>1.0.0</central-publishing-maven-plugin.version>

  1. Keep the rest of the POM intact; the existing pluginManagement block already references the properties:
  • maven-gpg-plugin uses ${maven-gpg-plugin.version} at line ~146
  • central-publishing-maven-plugin uses ${central-publishing-maven-plugin.version} at line ~198
  1. Add a short comment above the properties to explain why they are present (resolves CI release plugin resolution errors).

Exact patch (context):

In pom.xml, find the block and add the following lines (placement after existing properties is OK):

<maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
<central-publishing-maven-plugin.version>1.0.0</central-publishing-maven-plugin.version>

Notes and rationale

  • The root cause is unresolved property placeholders used as plugin versions; adding concrete versions fixes plugin resolution in Maven and allows the release plugin and central publishing extension to be downloaded.
  • If you prefer different versions for the central publishing plugin, update the property value accordingly. Verify the chosen version exists in Maven Central.
  • After the PR is created, run the release workflow again to verify the failure is resolved. If additional plugin versions are missing, add them similarly.

Please create a branch, apply the change to pom.xml at ref 00bd100, and open a pull request with a short description referencing the failing job (job id 57547711761) and this change.

Testing

  • CI should re-run on the PR. The expected result: Maven moves past the plugin resolution errors and proceeds with release:perform.

References

Do not include any other file changes in this PR.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: thomasturrell <1552612+thomasturrell@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix unresolved Maven plugin version errors in pom.xml Fix Maven plugin version properties for release builds Dec 9, 2025
@thomasturrell thomasturrell marked this pull request as ready for review December 9, 2025 12:59
Copilot AI review requested due to automatic review settings December 9, 2025 12:59
Copilot AI requested a review from thomasturrell December 9, 2025 12:59
Copy link
Contributor

Copilot AI left a comment

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 fixes Maven release build failures caused by undefined plugin version properties. The PR adds concrete version definitions for maven-gpg-plugin and central-publishing-maven-plugin which were being referenced in the POM but not defined, causing Maven to treat them as literal strings during the release:perform phase.

Key changes:

  • Added maven-gpg-plugin.version=3.2.8 property definition
  • Added central-publishing-maven-plugin.version=0.9.0 property definition

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 9, 2025

@thomasturrell thomasturrell merged commit aa1c799 into main Dec 9, 2025
9 checks passed
@thomasturrell thomasturrell deleted the copilot/fix-maven-plugin-versions branch December 9, 2025 13:03
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