bsorrentino/maven-annotation-plugin

Add option to fork for JDK9 support

beikov opened this issue · 7 comments

I just ran into an issue with this plugin and JDK 9. One of my annotation processors uses a module that isn't visible by default, thus I have to add the module via command line flags. Apparently the module is not picked up by javac if it's running in the same JVM so creating a forked javac would solve the issue.

Can you provide a option similar to what other plugins provide?

Note that a workaround is to add the modules to MAVEN_OPTS and also via compilerArguments.

Hi, thank for feedbacks

Interesting topic ....probably the issue could be solved adding a new ad-hoc argument

what do you think about ?

I'm not sure what you mean by ad hoc argument. Could you elaborate?

I mean a new configuration tag in your case fork (<fork>true</fork>) like for example the maven-compiler-plugin

However i suppose that you for module mean a jar, if it is so, have you tried to add it as plugin and/or project dependency ?

No what I mean in the JDK 9 sense are modules available on the module path like e.g. java.xml.bind.
The <fork>true</fork> tag is exactly what is needed!

Hi
I've deployed version 3.3-SNAPSHOT with support of fork property

Plugin now read maven.compiler.source and maven.compiler.target to set out of process compiler (default is 1.7)

If you have chance to test it, I really appreciate that

Thanks in advance

released in version 3.3