简体   繁体   中英

How to add Javac option in maven build process?

I want to compile my maven project with the javac options. How to include this javac option in the maven compilation process?

You can use <compilerArgs> tag. For example:

<compilerArgs>
  <arg>-Xmaxerrs</arg>
  <arg>1000</arg>
  <arg>-Xlint</arg>
  <arg>-J-Duser.language=en_us</arg>
</compilerArgs>

Here you can find the Maven documentation: http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#compilerArgs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM