How to configure compiler level (1.6) in maven set

2019-05-21 12:19发布

I am familiar with configuring maven-compiler-plugin to use java 1.6 in pom.xml and using parent pom file.

Is there a way to configure java compiler level to java 1.6 in the settings.xml level (so that all my maven projects will use java 1.6)?

In this thread default maven compiler setting somebody told there is a way to configure it in settings.xml. Can someone please explain how to configure?

PS: Another way to specify Java compiler level:

<properties>
       <maven.compiler.source>1.6</maven.compiler.source>
       <maven.compiler.target>1.6</maven.compiler.target>
</properties>

-Siva

标签: java maven-3
1条回答
forever°为你锁心
2楼-- · 2019-05-21 12:51

Simple answer No. In the settings file you don't configure things like this, cause it doesn't make sense and would make your builds not reproducible. The information about configuring the compiler plugin in settings.xml is rubbish.

查看更多
登录 后发表回答