Commit 912e0a41 authored by Matteo Melli's avatar Matteo Melli

Added maven.compiler.release when java version is 9+

parent 2dbbe4b9
......@@ -5,7 +5,7 @@
<groupId>com.ongres</groupId>
<artifactId>build-parent</artifactId>
<version>1.0.6</version>
<version>1.0.7</version>
<packaging>pom</packaging>
<name>ongres: build parent pom</name>
......@@ -352,6 +352,44 @@
</build>
<profiles>
<profile>
<id>jdk9+</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<properties>
<maven.compiler.release>${java.release.version}</maven.compiler.release>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>set-graal-home</id>
<phase>validate</phase>
<goals>
<goal>bsh-property</goal>
</goals>
<configuration>
<properties>
<property>maven.compiler.release</property>
</properties>
<source>
maven.compiler.release = session.getUserProperties().getProperty("java.version") != null
&amp;&amp; session.getUserProperties().getProperty("java.version").startsWith("1.")
? session.getUserProperties().getProperty("java.version").substring(2)
: session.getUserProperties().getProperty("java.version");
</source>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>safer</id> <!-- Slower but safer profile used to look for errors before pushing to SCM -->
<build>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment