Pass Compiler Arguments

Sometimes, you need to pass compiler arguments that are not handled by the Compiler Plugin itself. 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>...</version>
        <configuration>
          <compilerArgs>
            <arg>-verbose</arg>
            <arg>-Xlint:all</arg>
          </compilerArgs>
        </configuration>
      </plugin>
    </plugins>
    [...]
  </build>
  [...]
</project>