Hi Jason,

Jason Pyeron wrote:

>> -----Original Message-----
>> From: Manfred Moser [mailto:[email protected]]
>> Sent: Thursday, June 18, 2015 12:21 AM
>> To: [email protected]
>> Subject: Re: Default Maven Compiler Version
>> 
>> Yes... a corporate or some other higher level pom is
> 
> I think some detail was missed in the OP's question.
> 
> It is not that he always wants version X. It is he wants the default to be
> the version in the path for each system.
> 
> In other words: On system A it should be java version A on system B it
> should be java version B, etc.
> 
> Maybe start with this idea:
> 
> <properties>
>   <maven.compiler.source>${java.version}</maven.compiler.source>
>   <maven.compiler.target>${java.version}</maven.compiler.target>
> </properties>
> 
> Now I know that ${java.version} is likley to have some cruft in it, but
> someone better than I can come up with a way to strip out the 1.x from the
> java.version.

this can be achieved with automatically activated profiles for specific JDK 
versions and setting there the appropriate version as property value.

However, this makes repeatable builds even more brittle (now, you're 
depending on the current environment).

Cheers,
Jörg



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to