Skip to content

Conversation

@thomasturrell
Copy link
Contributor

No description provided.

@sonarqubecloud
Copy link

@thomasturrell thomasturrell merged commit 739de98 into main Nov 16, 2025
7 checks passed
@thomasturrell thomasturrell deleted the thomasturrell-patch-1 branch November 16, 2025 00:21
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 modifies Maven build arguments to exclude the xapi-build parent POM from deployment and adds the -am (also-make) flag to build dependencies.

Key Changes

  • Removes xapi-build from the project list (-pl) in deployment commands
  • Adds the -am flag to ensure dependencies are built before deployment
  • Changes are applied consistently across both Maven Release Plugin configuration and GitHub Actions snapshot publishing workflow

Reviewed Changes

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

File Description
pom.xml Modified maven-release-plugin arguments to exclude xapi-build and add -am flag for dependency building
.github/workflows/maven-publish-snapshot.yml Updated snapshot deployment command to match pom.xml changes by removing xapi-build and adding -am flag

<goals>deploy</goals>
<!-- Only release production modules, exclude all sample modules -->
<arguments>-pl xapi-build,xapi-model,xapi-client,xapi-model-spring-boot-starter</arguments>
<arguments>-pl xapi-model,xapi-client,xapi-model-spring-boot-starter -am</arguments>
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

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

Removing xapi-build from the -pl argument may cause issues for consumers. The child modules (xapi-model, xapi-client, xapi-model-spring-boot-starter) reference xapi-build as their parent in their POMs. When these artifacts are published to Maven Central, they will contain this parent reference, which means Maven needs to be able to resolve the xapi-build POM.

With this change, only the three explicitly listed modules will be deployed, not the parent POM. This could result in "Could not find artifact dev.learning.xapi:xapi-build:pom:version" errors for consumers.

The -am (also-make) flag ensures that dependencies are built before the specified modules, but it does not affect which modules are deployed - only modules in the -pl list are deployed.

Consider whether the parent POM should remain in the deployment list, or if there's another mechanism to ensure it's published to Maven Central.

Copilot uses AI. Check for mistakes.

- name: Publish snapshot package
run: mvn -B deploy --file pom.xml -pl xapi-build,xapi-model,xapi-client,xapi-model-spring-boot-starter
run: mvn -B deploy --file pom.xml -pl xapi-model,xapi-client,xapi-model-spring-boot-starter -am
Copy link

Copilot AI Nov 16, 2025

Choose a reason for hiding this comment

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

Removing xapi-build from the -pl argument may cause issues for consumers. The child modules (xapi-model, xapi-client, xapi-model-spring-boot-starter) reference xapi-build as their parent in their POMs. When these artifacts are published to the snapshot repository, they will contain this parent reference, which means Maven needs to be able to resolve the xapi-build POM.

With this change, only the three explicitly listed modules will be deployed, not the parent POM. This could result in "Could not find artifact dev.learning.xapi:xapi-build:pom:version" errors for consumers of snapshot versions.

The -am (also-make) flag ensures that dependencies are built before the specified modules, but it does not affect which modules are deployed - only modules in the -pl list are deployed.

Consider whether the parent POM should remain in the deployment list, or if there's another mechanism to ensure it's published to the snapshot repository.

Suggested change
run: mvn -B deploy --file pom.xml -pl xapi-model,xapi-client,xapi-model-spring-boot-starter -am
run: mvn -B deploy --file pom.xml -pl xapi-build,xapi-model,xapi-client,xapi-model-spring-boot-starter -am

Copilot uses AI. Check for mistakes.
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