Skip to content

Commit

Permalink
Scala 2.13 to require JDK17
Browse files Browse the repository at this point in the history
Signed-off-by: Gera Shegalov <[email protected]>
  • Loading branch information
gerashegalov committed Jun 28, 2024
1 parent c644ce8 commit 9d182b3
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 12 deletions.
39 changes: 35 additions & 4 deletions jdk-profiles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,45 @@
<version>24.08.0-SNAPSHOT</version>
<profiles>
<profile>
<id>jdk9plus</id>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
</properties>
<id>jdk8</id>
<activation>
<jdk>8</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala.plugin.version}</version>
<configuration>
<target>${java.major.version}</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>jdk9plus</id>
<activation>
<!-- activate for all java versions after 9 -->
<jdk>[9,)</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala.plugin.version}</version>
<configuration>
<release>${java.major.version}</release>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
</project>
7 changes: 5 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,6 @@ This will force full Scala code rebuild in downstream modules.
<checkMultipleScalaVersions>true</checkMultipleScalaVersions>
<failOnMultipleScalaVersions>true</failOnMultipleScalaVersions>
<recompileMode>${scala.recompileMode}</recompileMode>
<release>${java.major.version}</release>
<args>
<arg>-unchecked</arg>
<arg>-deprecation</arg>
Expand Down Expand Up @@ -1554,18 +1553,22 @@ This will force full Scala code rebuild in downstream modules.
<message>Minimum Maven version 3.6.x required</message>
<version>[3.6,)</version>
</requireMavenVersion>
<!-- #if scala-2.12 -->
<requireJavaVersion>
<message>Only Java 8, 11, and 17 are supported!</message>
<version>[1.8,1.9),[11,12),[17,18)</version>
</requireJavaVersion>
<!-- #if scala-2.12 -->
<requireProperty>
<property>buildver</property>
<regex>^(?!400).*$</regex>
<regexMessage>Spark 4.0.0 is only supported for Scala 2.13</regexMessage>
</requireProperty>
<!-- #endif scala-2.12 -->
<!-- #if scala-2.13 --><!--
<requireJavaVersion>
<message>Build for Scala 2.13 is only available with Java 17+</message>
<version>[17,)</version>
</requireJavaVersion>
<requireProperty>
<regexMessage>Unexpected buildver value ${buildver} for a Scala 2.13 build, only Apache Spark versions 3.3.0 (330) and higher are supported, no vendor builds such as 330db</regexMessage>
<property>buildver</property>
Expand Down
39 changes: 35 additions & 4 deletions scala2.13/jdk-profiles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,45 @@
<version>24.08.0-SNAPSHOT</version>
<profiles>
<profile>
<id>jdk9plus</id>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
</properties>
<id>jdk8</id>
<activation>
<jdk>8</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala.plugin.version}</version>
<configuration>
<target>${java.major.version}</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>jdk9plus</id>
<activation>
<!-- activate for all java versions after 9 -->
<jdk>[9,)</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala.plugin.version}</version>
<configuration>
<release>${java.major.version}</release>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
</project>
7 changes: 5 additions & 2 deletions scala2.13/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,6 @@ This will force full Scala code rebuild in downstream modules.
<checkMultipleScalaVersions>true</checkMultipleScalaVersions>
<failOnMultipleScalaVersions>true</failOnMultipleScalaVersions>
<recompileMode>${scala.recompileMode}</recompileMode>
<release>${java.major.version}</release>
<args>
<arg>-unchecked</arg>
<arg>-deprecation</arg>
Expand Down Expand Up @@ -1554,18 +1553,22 @@ This will force full Scala code rebuild in downstream modules.
<message>Minimum Maven version 3.6.x required</message>
<version>[3.6,)</version>
</requireMavenVersion>
<!-- #if scala-2.12 --><!--
<requireJavaVersion>
<message>Only Java 8, 11, and 17 are supported!</message>
<version>[1.8,1.9),[11,12),[17,18)</version>
</requireJavaVersion>
<!-- #if scala-2.12 --><!--
<requireProperty>
<property>buildver</property>
<regex>^(?!400).*$</regex>
<regexMessage>Spark 4.0.0 is only supported for Scala 2.13</regexMessage>
</requireProperty>
--><!-- #endif scala-2.12 -->
<!-- #if scala-2.13 -->
<requireJavaVersion>
<message>Build for Scala 2.13 is only available with Java 17+</message>
<version>[17,)</version>
</requireJavaVersion>
<requireProperty>
<regexMessage>Unexpected buildver value ${buildver} for a Scala 2.13 build, only Apache Spark versions 3.3.0 (330) and higher are supported, no vendor builds such as 330db</regexMessage>
<property>buildver</property>
Expand Down

0 comments on commit 9d182b3

Please sign in to comment.