Closed testforstephen closed 1 month ago
JavacUtils.configureOptions()
is definitely missing instructions to read project's org.eclipse.jdt.apt.processorOptions
and turn those into -Akey=value
pairs.
Since these processor options are persisted by apt.core plugin, and Javac plugin does not have dependency on apt plugin, we need to modify the upstream ImageBuilder interface (like what we have done to support alternative compiler) to get them. For example, make the ImageBuilder to prepare processor options from the APT participant and transfer them to the downside Compiler.
Since these processor options are persisted by apt.core plugin, and Javac plugin does not have dependency on apt plugin
Note that in principle, it would be fine to have the javac plugin requiring apt one, but I don't think it's technically possible, dependency already exist the other way round.
Those options seem to be plain preferences/options, it should be possible to just access project preferences directly through using new ProjectScope(project).getNode(....)
.
The sample project is https://github.com/apache/struts.git. The javac bits failed to compile it due to some annotation processing args missing.
In the original pom.xml, it specifies the arguments as follows:
And when m2e imports the projects, it converts these arguments as annotation processing into the setting org.eclipse.jdt.apt.core.prefs.
Lastly, when javac compiler compile the projects, it does not pick such ap arguments.