Description
Describe the bug
Since the current version (2.71.0) of jf-cli
, we are unable to compile any project using Quarkus Annotation Processors.
Our project structure is like the following:
quarkus-extenion \
|-- quarkus-extension-deployment \
|-- src \
|-- pom.xml
|-- quarkus-extension-runtime \
|-- src \
|-- pom.xml
|-- target \
|-- pom.xml
quarkus-solution \
|-- src \
|-- target \
|-- pom.xml
where the quarkus-solution
imports the quarkus-extension
.
When we run our pipeline with the jf-cli
, the maven compiler throws the following stack.
[2024-10-16T12:09:27.458Z] [main] INFO org.apache.maven.plugin.compiler.CompilerMojo - -------------------------------------------------------------
[2024-10-16T12:09:27.458Z] [main] ERROR org.apache.maven.plugin.compiler.CompilerMojo - COMPILATION ERROR :
[2024-10-16T12:09:27.458Z] [main] INFO org.apache.maven.plugin.compiler.CompilerMojo - -------------------------------------------------------------
[2024-10-16T12:09:27.458Z] [main] ERROR org.apache.maven.plugin.compiler.CompilerMojo - error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider io.quarkus.annotation.processor.ExtensionAnnotationProcessor could not be instantiated
[2024-10-16T12:09:27.458Z] [main] INFO org.apache.maven.plugin.compiler.CompilerMojo - 1 error
[2024-10-16T12:09:27.459Z] [main] INFO org.apache.maven.plugin.compiler.CompilerMojo - -------------------------------------------------------------
[2024-10-16T12:09:27.461Z] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[2024-10-16T12:09:27.461Z] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Reactor Summary for <quarkus-solution>-parent 18.0.0-SNAPSHOT:
[2024-10-16T12:09:27.461Z] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
[2024-10-16T12:09:27.462Z] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - <quarkus-extension>-parent ............. SUCCESS [ 0.667 s]
[2024-10-16T12:09:27.462Z] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - <quarkus-extension> .................... FAILURE [ 2.412 s]
[2024-10-16T12:09:27.462Z] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - <quarkus-extension>-deployment ......... SKIPPED
[2024-10-16T12:09:27.462Z] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[2024-10-16T12:09:27.462Z] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
[2024-10-16T12:09:27.462Z] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[2024-10-16T12:09:27.462Z] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 3.772 s
[2024-10-16T12:09:27.463Z] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2024-10-16T08:09:27-04:00
[2024-10-16T12:09:27.463Z] [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[2024-10-16T12:09:27.479Z] [main] ERROR org.apache.maven.cli.MavenCli - Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project <quarkus-extension>: Compilation failure
[2024-10-16T12:09:27.479Z] [main] ERROR org.apache.maven.cli.MavenCli - error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider io.quarkus.annotation.processor.ExtensionAnnotationProcessor could not be instantiated
[2024-10-16T12:09:27.479Z] [main] ERROR org.apache.maven.cli.MavenCli - -> [Help 1]
[2024-10-16T12:09:27.479Z] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project <quarkus-extension>: Compilation failure
[2024-10-16T12:09:27.479Z] error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider io.quarkus.annotation.processor.ExtensionAnnotationProcessor could not be instantiated
We have reverted to the previous version (2.70.0) and the problem does not appear.
We suspect that the jfrog/jfrog-cli-core#1277 commit is somewhat related to the error.
The modification of the projectRoot if no .mvn
is found could be problematic to projects that does not use it.
Current behavior
I am currently unable to provide a fullstack with the JFROG_CLI_LOG_LEVEL="DEBUG" enabled.
for the current behaviour, see Describ the bug
section above.
Reproduction steps
lauch regular maven deploy cycle with the jenkin plugin. The resulting command looks like this
/var/lib/****/tools/io.****.plugins.jfrog.JfrogInstallation/jfrog/jf mvn deploy -B -e -U -Dmaven.repo.local=/var/lib/****/.m2/executor1 -Dexecutor.number=1 -Dmaven.test.skip=true -Dartifactory.username=**** -Dartifactory.password=****
Expected behavior
Maven compiler annotation processor still works and does not fail during the annotation processing for quarkus extension processors.
JFrog CLI version
2.71.0
Operating system type and version
Ubuntu 20.04 LTS
JFrog Artifactory version
No response
JFrog Xray version
No response