Finding out which compiler Maven uses

本秂侑毒 提交于 2019-12-08 14:46:50

问题


Do you know how I can find out which of my JDKs Maven uses to compile my projects?


回答1:


mvn -version will spit out the version of maven and the jdk it is using.




回答2:


Sometimes you have to be aware of the Maven compiler plugin configuration, cause it could be that there is defined to use a different source/target configuration or may be to use a different JDK etc.

mvn help:effective-pom

could give you the needed information.




回答3:


The maven-compiler-plugin uses javac by default, and binds by default to the compile lifecycle phase.
This configuration can be overridden see non-javac compilers



来源:https://stackoverflow.com/questions/3011977/finding-out-which-compiler-maven-uses

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!