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

"jf mvn compile" not giving expected output #2602

Open
shivanibudhodi opened this issue Jul 16, 2024 · 3 comments
Open

"jf mvn compile" not giving expected output #2602

shivanibudhodi opened this issue Jul 16, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@shivanibudhodi
Copy link

Describe the bug

When configuring a Maven project using the JFrog CLI, the "jf mvn compile" command completes the build process successfully, but the actual compilation fails. Despite the build being marked as successful, the output indicates a failure status.

Current behavior

I tried setting up a sample maven project, and encountered the below error while executing the "jf mvn compile"

17:29:00 [🔵Info] Running Mvn...
17:29:00 [🔵Info] Running mvn command: /usr/bin/java -classpath /usr/share/maven/boot/plexus-classworlds-2.x.jar -Dmaven.home=/usr/share/maven -DbuildInfoConfig.propertiesFile=/tmp/jfrog/properties/extractorProperties135610658 -Dm3plugin.lib=/root/.jfrog/dependencies/maven/2.41.16 -Dclassworlds.conf=/root/.jfrog/dependencies/maven/2.41.16/classworlds.conf -Dmaven.multiModuleProjectDirectory=/root/proj/my-sample-project -DbuildInfoConfig.artifactoryResolutionEnabled=true org.codehaus.plexus.classworlds.launcher.Launcher compile
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
[main] INFO org.jfrog.build.extractor.maven.BuildInfoRecorder - Initializing Artifactory Build-Info Recording
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ---------------------< com.example:sample-project >---------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building sample-project 1.0-SNAPSHOT
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --------------------------------[ jar ]---------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-resources-plugin:2.6:resources (default-resources) @ sample-project ---
[main] WARNING org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - skip non existing resourceDirectory /root/proj/my-sample-project/src/main/resources
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-compiler-plugin:3.1:compile (default-compile) @ sample-project ---
[main] INFO org.apache.maven.plugin.compiler.CompilerMojo - Nothing to compile - all classes are up to date
[main] INFO org.jfrog.build.extractor.maven.BuildDeploymentHelper - Artifactory Build Info Recorder: Saving Build Info to '/root/proj/my-sample-project/target/build-info.json'
[main] INFO org.jfrog.build.extractor.maven.BuildDeploymentHelper - Artifactory Build Info Recorder: deploy artifacts set to false, artifacts will not be deployed...
[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 - BUILD SUCCESS
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 1.180 s
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2024-06-10T17:29:02Z
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
{
"status": "failure",
"totals": {
"success": 0,
"failure": 1
}
}

Reproduction steps

  1. Create a Maven Project.
  2. Configure with jf CLI
  3. Execute the "jf mvn compile" inside that particular project.

Expected behavior

No response

JFrog CLI version

Latest JFrog CLI version

Operating system type and version

Linux

JFrog Artifactory version

No response

JFrog Xray version

No response

@shivanibudhodi shivanibudhodi added the bug Something isn't working label Jul 16, 2024
@chrisjschultz
Copy link

chrisjschultz commented Nov 18, 2024

I believe the jf command/build fails whenever artifacts are not detected/uploaded - I have the same issue with release:prepare.

@mhuijgen
Copy link

@chrisjschultz as a workaround if you remove the deploy repositories from your jfrog maven config ( jf mvnc ), it will not fail if you run jf mvn for commands that do not deploy.

But still pretty annoying bug this.

@chrisjschultz
Copy link

Thanks, interesting workaround...

I agree, I would like to see it fixed.

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

No branches or pull requests

3 participants