Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Artifacts are being deployed with the parameter "-Dartifactory.publish.artifacts=false" enabled #2373

Closed
ujwalpoovaiah opened this issue Dec 19, 2023 · 3 comments · Fixed by jfrog/build-info#775
Labels
bug Something isn't working

Comments

@ujwalpoovaiah
Copy link

Describe the bug

Maven clean install with the parameter -Dartifactory.publish.artifacts=false enabled is not preventing the artifacts being deployed to Artifactory.

It used to work as expected in the older version ( example: 2.51.1 ) . However the issue is being noticed in the latest version of the JFrog CLI

Current behavior

We can notice that artifacts being successfully published to the Artifactory even after enabling the parameters.
``[main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-install-plugin:2.4:install (default-install) @ multi3 ---
[main] INFO org.codehaus.plexus.PlexusContainer - Installing /root/project-examples/maven-examples/maven-example/multi3/target/multi3-3.7-SNAPSHOT.war to /root/.m2/repository/org/jfrog/test/multi3/3.7-SNAPSHOT/multi3-3.7-SNAPSHOT.war
[main] INFO org.codehaus.plexus.PlexusContainer - Installing /root/project-examples/maven-examples/maven-example/multi3/pom.xml to /root/.m2/repository/org/jfrog/test/multi3/3.7-SNAPSHOT/multi3-3.7-SNAPSHOT.pom
[main] INFO org.jfrog.build.extractor.maven.BuildDeploymentHelper - Artifactory Build Info Recorder: Saving Build Info to '/root/project-examples/maven-examples/maven-example/target/build-info.json'
[pool-1-thread-1] INFO org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - [pool-1-thread-1] Deploying artifact: http://localhost:8081/artifactory/test10-libs-snapshot-local/org/jfrog/test/multi2/3.7-SNAPSHOT/multi2-3.7-SNAPSHOT.jar
[pool-1-thread-3] INFO org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - [pool-1-thread-3] Deploying artifact: http://localhost:8081/artifactory/test10-libs-snapshot-local/org/jfrog/test/multi/3.7-SNAPSHOT/multi-3.7-SNAPSHOT.pom
[pool-1-thread-2] INFO org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - [pool-1-thread-2] Deploying artifact: http://localhost:8081/artifactory/test10-libs-snapshot-local/org/jfrog/test/multi1/3.7-SNAPSHOT/multi1-3.7-SNAPSHOT-tests.jar
[pool-1-thread-2] INFO org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - [pool-1-thread-2] Deploying artifact: http://localhost:8081/artifactory/test10-libs-snapshot-local/org/jfrog/test/multi1/3.7-SNAPSHOT/multi1-3.7-SNAPSHOT-sources.jar
[pool-1-thread-3] INFO org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - [pool-1-thread-3] Deploying artifact: http://localhost:8081/artifactory/test10-libs-snapshot-local/org/jfrog/test/multi3/3.7-SNAPSHOT/multi3-3.7-SNAPSHOT.war
[pool-1-thread-1] INFO org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - [pool-1-thread-1] Deploying artifact: http://localhost:8081/artifactory/test10-libs-snapshot-local/org/jfrog/test/multi2/3.7-SNAPSHOT/multi2-3.7-SNAPSHOT.pom
[pool-1-thread-2] INFO org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - [pool-1-thread-2] Deploying artifact: http://localhost:8081/artifactory/test10-libs-snapshot-local/org/jfrog/test/multi1/3.7-SNAPSHOT/multi1-3.7-SNAPSHOT.jar
[pool-1-thread-2] INFO org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - [pool-1-thread-2] Deploying artifact: http://localhost:8081/artifactory/test10-libs-snapshot-local/org/jfrog/test/multi1/3.7-SNAPSHOT/multi1-3.7-SNAPSHOT.pom
[pool-1-thread-3] INFO org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - [pool-1-thread-3] Deploying artifact: http://localhost:8081/artifactory/test10-libs-snapshot-local/org/jfrog/test/multi3/3.7-SNAPSHOT/multi3-3.7-SNAPSHOT.pom
[main] INFO org.jfrog.build.extractor.maven.BuildDeploymentHelper - Artifactory Build Info Recorder: publish build info set to false, build info will not be published...
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Reactor Summary for Simple Multi Modules Build 3.7-SNAPSHOT:
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Simple Multi Modules Build ......................... SUCCESS [ 0.359 s]
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Multi 1 ............................................ SUCCESS [ 2.876 s]
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Multi 2 ............................................ SUCCESS [ 0.316 s]
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Multi 3 ............................................ SUCCESS [ 0.854 s]
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD SUCCESS
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 5.882 s
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2023-12-19T05:02:32Z
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
05:02:32 [🔵Info] These files were uploaded:

📦 test10-libs-snapshot-local
└── 📁 org
└── 📁 jfrog
└── 📁 test
├── 📁 multi
│ └── 📁 3.7-SNAPSHOT
│ └── 📄 multi-3.7-20231219.050224-2.pom
├── 📁 multi3
│ └── 📁 3.7-SNAPSHOT
│ ├── 📄 multi3-3.7-20231219.050224-2.war
│ └── 📄 multi3-3.7-20231219.050224-2.pom
├── 📁 multi2
│ └── 📁 3.7-SNAPSHOT
│ ├── 📄 multi2-3.7-20231219.050224-2.pom
│ └── 📄 multi2-3.7-20231219.050224-2.jar
└── 📁 multi1
└── 📁 3.7-SNAPSHOT
├── 📄 multi1-3.7-20231219.050224-2-tests.jar
├── 📄 multi1-3.7-20231219.050224-2-sources.jar
├── 📄 multi1-3.7-20231219.050224-2.jar
└── 📄 multi1-3.7-20231219.050224-2.pom

{
"status": "success",
"totals": {
"success": 9,
"failure": 0
}
}

Reproduction steps

1.Take any maven sample project
2.Configure maven client with Artifactory using CLI
jf c add
jf mvnc
jf mvn clean install -Dartifactory.publish.artifacts=false

Expected behavior

Enabling the parameter -Dartifactory.publish.artifacts=false should not deploy the artifacts to the Artifactory.

JFrog CLI version

2.52.3

Operating system type and version

linux

JFrog Artifactory version

7.71.8

JFrog Xray version

No response

@ujwalpoovaiah ujwalpoovaiah added the bug Something isn't working label Dec 19, 2023
@julien-cha
Copy link

I'm encountering the same issue on our side, is there another way to prevent publishing (another option or flag to set) ?
Or will a fix be quickly available ?

Thanks

@yahavi
Copy link
Member

yahavi commented Dec 31, 2023

@julien-cha
Thanks for reporting this issue.

We've pinpointed this problem and are actively resolving it. You can find the fix and an explanation of what occurred in the following pull request: jfrog/build-info#775.

We'll keep you posted here.

@yahavi
Copy link
Member

yahavi commented Jan 23, 2024

@julien-cha
JFrog CLI 2.52.10 has been released. This version includes the fix for this issue.
We'd appreciate your feedback on that.

@yahavi yahavi closed this as completed Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants