Greetings,

Has anyone used maven-compiler-plugin to invoke Annotation processor on Java sources?

I have a use case where I need to invoke an annotation processor via the maven-compiler-plugin. I need to pass in an option to the processor (done using -A option on 'javac' or 'apt'), but it appears that I can't just use <compilerArguments>.

I decided to look up test cases in maven-compiler-plugin sources hoping to find an example there, but none. So I started to put together a unit test for annotation processor invocation.

The issue that I am running into currently is obtaining a Toolchain instance in a test case, which appears to be due to the absence of a MavenSession handle where running a Mojo unit test.

Can anyone share if its possible to workaround this limitation?

Thanks in advance,

Rahul



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to