Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.8, 2.10.0, 2.11.1
-
None
-
None
-
Ubuntu 18.04 or OSX machine. ECJ version 4.7 or 4.9. Java 8, either OpenJDK and Oracle. Reproduced with Log4j 2.8, 2.10.0 and 2.11.1.
Description
Recently I started using log4j 2 in my project and I created some custom appenders and configuration factories using the @Plugin annotation.
It all worked fine and show no errors compiling in Eclipse 4.9 and IntelliJ Idea. However, using the Eclipse batch compiler, my code fails with the following stacktrace:
Processing annotations java.lang.IllegalArgumentException: Unknown location : CLASS_OUTPUT at org.eclipse.jdt.internal.compiler.apt.util.EclipseFileManager.getFileForOutput(EclipseFileManager.java:436) at org.eclipse.jdt.internal.compiler.apt.dispatch.BatchFilerImpl.createResource(BatchFilerImpl.java:89) at org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor.writeCacheFile(PluginProcessor.java:117) at org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor.process(PluginProcessor.java:78) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:142) at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:124) at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:162) at org.eclipse.jdt.internal.compiler.Compiler.processAnnotations(Compiler.java:940) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:450) at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:426) at org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(Main.java:4693) at org.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:1781) at org.eclipse.jdt.internal.compiler.batch.Main.main(Main.java:1485) Processing annotations No elements to process 1. ERROR: Unknown location : CLASS_OUTPUT 1 problem (1 error)
In order to reproduce this bug, I created this project with the minimal code to test my scenario.