On Fri, Jan 13, 2017 at 8:51 AM Dean Schulze <dean.w.schu...@gmail.com> wrote:
> I would like to avoid having to add > > <properties> > <maven.compiler.source>1.8</maven.compiler.source> > <maven.compiler.target>1.8</maven.compiler.target> > </properties> > > to every pom.xml. Is there a global setting I can set in mvn to make Java > 8 the default so I don't have to add this to every pom.xml? > Like others on the list, I recommend you use a common parent pom, since these settings are part of the reproducibility of your build. If for some reason you're not going to do that, then I suppose you can add -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8 to MAVEN_OPTS in your ~/.mavenrc file (which does not appear to be listed here: http://maven.apache.org/configure.html, but definitely is consulted as part of overall Maven configuration at startup). (Of course if I or others consume your pom.xml we have no idea what version of Java we're supposed to use.) Best, Laird