You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "estekhin (via GitHub)" <gi...@apache.org> on 2026/10/03 08:03:32 UTC
[I] 4.0.0-beta-5 fails due to missing transitive dependency for annotation with RetentionPolicy.CLASS [maven-compiler-plugin]
estekhin opened a new issue, #1150:
URL: https://github.com/apache/maven-compiler-plugin/issues/1150
### Affected version
4.0.0-beta-5
### Bug description
Hello!
If the project module doesn't use lombok itself, but depends on the third-party library that, sadly, uses lombok,
then
compiling that module with maven 4.0.0-rc-7 and maven-compiler-plugin=3.16.0 works,
compiling that module with maven 4.0.0-rc-7 and maven-compiler-plugin=4.0.0-beta-5 fails with
```
[ERROR] The first error is: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for lombok.NonNull not found
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:4.0.0-beta-5:compile (default-compile) on project my-module: Cannot compile my-group:my-module:jar:1.0-SNAPSHOT main classes.
The first error is: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for lombok.NonNull not found
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:346)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:310)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:214)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:179)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:168)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:165)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:110)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.lambda$createBuildCallable$0(MultiThreadedBuilder.java:191)
at java.util.concurrent.FutureTask.run(FutureTask.java:330)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
at java.util.concurrent.FutureTask.run(FutureTask.java:330)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
at java.lang.Thread.run(Thread.java:1516)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Cannot compile my-group:my-module:jar:1.0-SNAPSHOT main classes.
The first error is: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for lombok.NonNull not found
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.compile(AbstractCompilerMojo.java:1454)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1207)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:203)
at org.apache.maven.plugin.DefaultBuildPluginManager$MojoWrapper.execute(DefaultBuildPluginManager.java:244)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:339)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:310)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:214)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:179)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:168)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:165)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:110)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.lambda$createBuildCallable$0(MultiThreadedBuilder.java:191)
at java.util.concurrent.FutureTask.run(FutureTask.java:330)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
at java.util.concurrent.FutureTask.run(FutureTask.java:330)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
at java.lang.Thread.run(Thread.java:1516)
Caused by: java.lang.RuntimeException: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for lombok.NonNull not found
at com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:168)
at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
at org.apache.maven.plugin.compiler.ToolExecutor.compile(ToolExecutor.java:973)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.compile(AbstractCompilerMojo.java:1398)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1207)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:203)
at org.apache.maven.plugin.DefaultBuildPluginManager$MojoWrapper.execute(DefaultBuildPluginManager.java:244)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:339)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:310)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:214)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:179)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:168)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:165)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:110)
at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.lambda$createBuildCallable$0(MultiThreadedBuilder.java:191)
at java.util.concurrent.FutureTask.run(FutureTask.java:330)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
at java.util.concurrent.FutureTask.run(FutureTask.java:330)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
at java.lang.Thread.run(Thread.java:1516)
Caused by: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for lombok.NonNull not found
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] 4.0.0-beta-5 fails due to missing transitive dependency for annotation with RetentionPolicy.CLASS [maven-compiler-plugin]
Posted by "desruisseaux (via GitHub)" <gi...@apache.org>.
desruisseaux closed issue #1150: 4.0.0-beta-5 fails due to missing transitive dependency for annotation with RetentionPolicy.CLASS
URL: https://github.com/apache/maven-compiler-plugin/issues/1150
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] 4.0.0-beta-5 fails due to missing transitive dependency for annotation with RetentionPolicy.CLASS [maven-compiler-plugin]
Posted by "efegokdemir (via GitHub)" <gi...@apache.org>.
efegokdemir commented on issue #1150:
URL: https://github.com/apache/maven-compiler-plugin/issues/1150#issuecomment-6045483856
I’ll investigate the Maven 4 compiler classpath for CLASS-retained annotations on transitive dependencies, reproduce the beta-5 failure in a small integration fixture, and add regression coverage if the current master still has the issue. The open Kotlin-output classpath work appears separate; I’ll keep the change focused on dependency annotation resolution.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org