jfrog / build-info

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

Skip collecting pom if not exists #770

Closed yahavi closed 7 months ago

yahavi commented 7 months ago

In Maven builds, the absence of a pom.xml file in the working directory might result in the following error:

java.lang.IllegalArgumentException: File not found: null
    at org.jfrog.build.extractor.clientConfiguration.deploy.DeployDetails$Builder.build (DeployDetails.java:154)
    at org.jfrog.build.extractor.maven.BuildInfoRecorder.addDeployableArtifact (BuildInfoRecorder.java:577)
    at org.jfrog.build.extractor.maven.BuildInfoRecorder.addPomArtifact (BuildInfoRecorder.java:540)

To replicate this problem, use the Maven deploy plugin to deploy a file from a directory lacking pom.xml. For instance:

jf mvn org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file -Dfile=README -Durl=https://acme.jfrog.io/artifactory/default-maven-local/ -DgroupId=groupId -DartifactId=artifactId -Dversion=1.0.0 -Dpackaging=jar -DrepositoryId=artifactory -s settings.xml
github-actions[bot] commented 7 months ago
[![👍 Frogbot scanned this pull request and found that it did not add vulnerable dependencies.](https://raw.githubusercontent.com/jfrog/frogbot/master/resources/v2/noVulnerabilityBannerPR.png)](https://github.com/jfrog/frogbot#readme)

[🐸 JFrog Frogbot](https://github.com/jfrog/frogbot#readme)