jfrog / build-info

Artifactory's open integration layer for CI build servers
https://www.buildinfo.org
Apache License 2.0
148 stars 157 forks source link

Cannot turn publishing artifacts off #776

Closed ojecborec closed 10 months ago

ojecborec commented 10 months ago

Describe the bug Trying to build Maven project without publishing artifacts to Artifactory. Looks like -Dartifactory.publish.artifacts=false parameter is being ignored. Has this parameter changed recently?

To Reproduce JFrog CLI 2.52.8

jf mvn install -f pom.xml -Dartifactory.publish.artifacts=false -Dartifactory.publish.buildInfo=false --build-name=MyProject --build-number=20230103.1
15:44:25 [🔵Info] Downloading JFrog's Dependency from https://releases.jfrog.io/artifactory/oss-release-local/org/jfrog/buildinfo/build-info-extractor-maven3/2.41.9/build-info-extractor-maven3-2.41.9-uber.jar
[pool-6-thread-2] INFO org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - [pool-6-thread-2] Deploying artifact: https://.../my-project.jar
...

I can only exclude publishing artifacts if I use mvn package instead of mvn install which is something I'm trying to avoid.

Expected behavior JFrog CLI 2.51.1 works as expected. See the log entry: deploy artifacts set to false, artifacts will not be deployed

jf mvn install -f pom.xml -Dartifactory.publish.artifacts=false -Dartifactory.publish.buildInfo=false --build-name=MyProject --build-number=20230103.1
15:28:11 [🔵Info] Downloading JFrog's Dependency from https://releases.jfrog.io/artifactory/oss-release-local/org/jfrog/buildinfo/build-info-extractor-maven3/2.41.7/build-info-extractor-maven3-2.41.7-uber.jar
[main] INFO org.jfrog.build.extractor.maven.BuildDeploymentHelper - Artifactory Build Info Recorder: deploy artifacts set to false, artifacts will not be deployed...

Versions

yahavi commented 10 months ago

@ojecborec Thanks for reporting this issue. We already created #775 to fix it. You can subscribe https://github.com/jfrog/jfrog-cli/issues/2373 for updates.

ojecborec commented 10 months ago

Thank you for letting me know. I'm closing this issue.