It is no problem if you have installed multiple JVMs, maven only knows about 
the current java version used to start it or if you explicitly specify 
executables or toolchains. (Some POMs like Apache Commons defines profiles 
using environment variables like JAVA_1_8_HOME)
Anyway, on your system you can test it, if you do not specify source or target 
versions it will default to the start-jvm (which is not good for having stable 
and repeatable builds)
Gruss
Bernd
-- 
http://bernd.eckenfels.net




On Fri, Jan 13, 2017 at 6:15 PM +0100, "John Patrick" <nhoj.patr...@gmail.com> 
wrote:










If you only have Java 8 installed, would that work? Or does target
still default to something older? I've got Java 7, 8 and 9 on my
machine so can't easily test myself.


On 13 January 2017 at 17:04, Chris Barlock  wrote:
> Most projects I've been on have a notion of a "parent" or "common" script
> (whether Ant, Maven or just about anything else).  With Maven, you could
> define a  POM that contains all the common stuff.  Of course, you
> would have to add the parent element to all child POMs, but if you ever
> want to change something in the parent (such as this Java version), you
> would only have to do it once.
>
> Chris
>
>
>
>
> From:   Dean Schulze 
> To:     users@maven.apache.org
> Date:   01/13/2017 11:51 AM
> Subject:        Is there a way to make mvn default to Java 8?
>
>
>
> I would like to avoid having to add
>
> 
> 1.8
> 1.8
> 
>
> 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?
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org






Reply via email to