Pass Compiler Arguments
Sometimes, you need to pass compiler arguments that are not handled by the Compiler Plugin itself but are supported by the compilerId
selected. For such arguments, use the Compiler Plugin's compilerArgs
parameter The following example passes compiler arguments to the javac
compiler:
<project> [...] <build> [...] <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>4.0.0-beta-1</version> <configuration> <compilerArgs> <arg>-verbose</arg> <arg>-Xlint:all,-options,-path</arg> </compilerArgs> </configuration> </plugin> </plugins> [...] </build> [...] </project>