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

Maven Compiler - Quarkus Annotations Processor failed with Processor #2729

Open
pspino opened this issue Oct 16, 2024 · 2 comments
Open

Maven Compiler - Quarkus Annotations Processor failed with Processor #2729

pspino opened this issue Oct 16, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@pspino
Copy link

pspino commented Oct 16, 2024

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

@pspino pspino added the bug Something isn't working label Oct 16, 2024
@yahavi
Copy link
Member

yahavi commented Oct 18, 2024

@pspino
Thanks for reporting this issue!

@galusben - Could it be related to this?
jfrog/jfrog-cli-core#1273
jfrog/build-info-go#279

@GuillaumeBenini
Copy link

Is there any news on this issue? We won't be able to update the jfrog-cli as long as it is a problem.

Thanks!

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