GitHub user jbisotti edited a comment on the discussion: 
java.lang.IllegalArgumentException: The `GraalVmProcessor` annotation processor 
is missing the required `log4j.graalvm.groupId` and `log4j.graalvm.artifactId` 
options

To keep deprecated code out of our codebase, we enable deprecation warnings and 
treat compilation warnings as errors, in order to break the build and call 
attention to the deprecated code usage.
```xml
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.13.0</version>
                    <configuration>
                        <compilerArgs>

                            <!-- Treat Warnings as Errors -->
                            <arg>-Werror</arg>

                            <!-- Enable deprecation warnings -->
                            <arg>-Xlint:deprecation</arg>

                        </compilerArgs>
                        <showWarnings>true</showWarnings>
                        <!-- 
https://issues.apache.org/jira/browse/MCOMPILER-209 -->
                        
<useIncrementalCompilation>false</useIncrementalCompilation>
                    </configuration>
                </plugin>
```

We do not use Graal.
We do not have any custom annotation processors.
We do not have any @PluginS.
We do use Mockito.

I tried upgrading from 2.24.3 to 2.25.1 but the build fails with:
```shell
...
[INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ kfs-core ---
[INFO] Compiling 954 source files with javac [debug release 21] to 
target/test-classes
[INFO] Annotation processing is enabled because one or more processors were 
found
  on the class path. A future release of javac may disable annotation processing
  unless at least one processor is specified by name (-processor), or a search
  path is specified (--processor-path, --processor-module-path), or annotation
  processing is enabled explicitly (-proc:only, -proc:full).
  Use -Xlint:-options to suppress this message.
  Use -proc:none to disable annotation processing.
[INFO] GraalVmProcessor: writing GraalVM metadata for 2 Java classes to 
`META-INF/native-image/log4j-generated/cb86055/reflect-config.json`.
[INFO] PluginProcessor: writing plugin descriptor for 4 Log4j Plugins to 
`META-INF/org/apache/logging/log4j/core/config/plugins/Log4j2Plugins.dat`.
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING : 
[INFO] -------------------------------------------------------------
[WARNING] The `GraalVmProcessor` annotation processor is missing the 
recommended `log4j.graalvm.groupId` and `log4j.graalvm.artifactId` options.
  To follow the GraalVM recommendations, please add the following options to 
your build tool:
    -Alog4j.graalvm.groupId=<groupId>
    -Alog4j.graalvm.artifactId=<artifactId>
[INFO] 1 warning
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] warnings found and -Werror specified
[INFO] 1 error
...
```

Due to our steps to keep deprecated code out of the codebase, this warning, for 
something we do not use and do not care about, is breaking the build. It 
doesn't make sense to have to provide useless configuration in N different 
builds to make this go away.

GitHub link: 
https://github.com/apache/logging-log4j2/discussions/3755#discussioncomment-13765756

----
This is an automatically sent email for dev@logging.apache.org.
To unsubscribe, please send an email to: dev-unsubscr...@logging.apache.org

Reply via email to