Skip to content

Fix Maven verify goal including undeployed artifacts in build info#830

Merged
agrasth merged 1 commit intojfrog:masterfrom
agrasth:mavenVerifyFix
Sep 23, 2025
Merged

Fix Maven verify goal including undeployed artifacts in build info#830
agrasth merged 1 commit intojfrog:masterfrom
agrasth:mavenVerifyFix

Conversation

@agrasth
Copy link
Copy Markdown
Contributor

@agrasth agrasth commented Sep 22, 2025

  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.

Fix Maven verify goal including undeployed artifacts in build info

Problem

Maven verify goal was incorrectly including built artifacts in the build info even though these artifacts were never deployed to Artifactory. This caused issues when creating Release Bundles, as they referenced non-existent artifacts.

Solution

Added a check in BuildInfoRecorder.addArtifactsToCurrentModule() to respect the publish.artifacts configuration property. When artifact publishing is disabled, the extractor now skips artifact collection entirely.

Changes

  • File: build-info-extractor-maven3/src/main/java/org/jfrog/build/extractor/maven/BuildInfoRecorder.java
  • Change: Added !conf.publisher.isPublishArtifacts() check before collecting artifacts
  • Behavior:
    • mvn verify: ✅ Dependencies collected, ❌ No artifacts in build info
    • mvn deploy: ✅ Dependencies collected, ✅ Artifacts collected and deployed

Testing

  • Verified verify goal produces build info with 0 artifacts and dependencies intact
  • Verified deploy goal continues to work normally with artifacts included
  • No breaking changes to existing functionality

Impact

Fixes Release Bundle creation failures caused by referencing undeployed artifacts from verify builds.

@bhanurp bhanurp added the safe to test Approve running integration tests on a pull request label Sep 23, 2025
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Sep 23, 2025
@agrasth agrasth merged commit 3372263 into jfrog:master Sep 23, 2025
19 of 30 checks passed
nitinp19 pushed a commit to nitinp19/build-info that referenced this pull request Sep 23, 2025
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