Javac provides the following nonstandard option (from "javac -X" command line help):
-Xplugin:"name args" Name and optional arguments for a plug-in to be run
However, Maven does not handle that format. For example, the following does not work:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<arg>-Xplugin:"Manifold static"</arg>
</compilerArgs>
</configuration>
</plugin>
I've tried several different variations and tried replacing the space with '=', still no bueno. Is there a workaround?
Note I am using the Manifold javac plugin with Java 8. Reproducing is simple.. create a pom with a dependency on the manifold-all jar:
<dependency>
<groupId>systems.manifold</groupId>
<artifactId>manifold-all</artifactId>
<version>0.9-alpha</version>
</dependency>
You don't really need any source, this is just to demonstrate that Maven will not accept the -Xplugin:"Manifold static" javac argument.
Also note Java 9 appears to have changed the format of -Xplugin to no longer require quotes. See the Java 9 docs on this.
-Xplugin:Manifoldjavac argument with the base jar file dependency:<dependency> <groupId>systems.manifold</groupId> <artifactId>manifold</artifactId> <version>0.9-alpha</version> </dependency>-Xplugin:"Manifold static"argument.