You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2023/09/15 12:48:13 UTC

[logging-log4j-scala] 03/03: Fix compilation of 2.10, 2.11 and 3

This is an automated email from the ASF dual-hosted git repository.

pkarwasz pushed a commit to branch facelift
in repository https://gitbox.apache.org/repos/asf/logging-log4j-scala.git

commit 1ebc9381e6c3d001a682e696101cd5cc41642d42
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Fri Sep 15 14:48:03 2023 +0200

    Fix compilation of 2.10, 2.11 and 3
---
 log4j-api-scala_2.10/pom.xml |  5 +++++
 log4j-api-scala_2.11/pom.xml |  5 +++++
 log4j-api-scala_2.12/pom.xml |  7 +++++++
 log4j-api-scala_2.13/pom.xml |  7 +++++++
 log4j-api-scala_3/pom.xml    |  7 +++++++
 pom.xml                      | 30 +++++++++++++++++++++++++++++-
 6 files changed, 60 insertions(+), 1 deletion(-)

diff --git a/log4j-api-scala_2.10/pom.xml b/log4j-api-scala_2.10/pom.xml
index 18ef695..5809806 100644
--- a/log4j-api-scala_2.10/pom.xml
+++ b/log4j-api-scala_2.10/pom.xml
@@ -85,6 +85,11 @@
 
   <build>
     <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-toolchains-plugin</artifactId>
+      </plugin>
+
       <plugin>
         <groupId>net.alchim31.maven</groupId>
         <artifactId>scala-maven-plugin</artifactId>
diff --git a/log4j-api-scala_2.11/pom.xml b/log4j-api-scala_2.11/pom.xml
index dc182d7..582c4ec 100644
--- a/log4j-api-scala_2.11/pom.xml
+++ b/log4j-api-scala_2.11/pom.xml
@@ -85,6 +85,11 @@
 
   <build>
     <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-toolchains-plugin</artifactId>
+      </plugin>
+
       <plugin>
         <groupId>net.alchim31.maven</groupId>
         <artifactId>scala-maven-plugin</artifactId>
diff --git a/log4j-api-scala_2.12/pom.xml b/log4j-api-scala_2.12/pom.xml
index 833986a..44d5d3c 100644
--- a/log4j-api-scala_2.12/pom.xml
+++ b/log4j-api-scala_2.12/pom.xml
@@ -39,6 +39,13 @@
       <artifactId>log4j-api</artifactId>
     </dependency>
 
+    <dependency>
+      <groupId>org.scala-lang</groupId>
+      <artifactId>scala-library</artifactId>
+      <version>${scala.version}</version>
+      <scope>provided</scope>
+    </dependency>
+
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
diff --git a/log4j-api-scala_2.13/pom.xml b/log4j-api-scala_2.13/pom.xml
index af27184..25b7d65 100644
--- a/log4j-api-scala_2.13/pom.xml
+++ b/log4j-api-scala_2.13/pom.xml
@@ -39,6 +39,13 @@
       <artifactId>log4j-api</artifactId>
     </dependency>
 
+    <dependency>
+      <groupId>org.scala-lang</groupId>
+      <artifactId>scala-library</artifactId>
+      <version>${scala.version}</version>
+      <scope>provided</scope>
+    </dependency>
+
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
diff --git a/log4j-api-scala_3/pom.xml b/log4j-api-scala_3/pom.xml
index 549af8e..3dc55b3 100644
--- a/log4j-api-scala_3/pom.xml
+++ b/log4j-api-scala_3/pom.xml
@@ -39,6 +39,13 @@
       <artifactId>log4j-api</artifactId>
     </dependency>
 
+    <dependency>
+      <groupId>org.scala-lang</groupId>
+      <artifactId>scala3-library_${scala.version.group}</artifactId>
+      <version>${scala.version}</version>
+      <scope>provided</scope>
+    </dependency>
+
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
diff --git a/pom.xml b/pom.xml
index b61be90..5177434 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,16 +44,23 @@
     <revision>13.0.0-SNAPSHOT</revision>
 
     <!-- javac version (should work with the minimum `scala.version`!) -->
-    <minimalJavaBuildVersion>[1.8,9)</minimalJavaBuildVersion>
+    <minimalJavaBuildVersion>[17,18)</minimalJavaBuildVersion>
 
     <!-- scala version (to be overridden by modules!) -->
     <scala.version.group>2.10</scala.version.group>
     <scala.version>${scala.version.group}.7</scala.version>
 
+    <!-- JDK 8 does not support -release -->
+    <maven.compiler.source>8</maven.compiler.source>
+    <maven.compiler.target>8</maven.compiler.target>
+
     <!-- disable `maven-site-plugin`-->
     <maven.site.skip>true</maven.site.skip>
     <maven.site.deploy.skip>true</maven.site.deploy.skip>
 
+    <!-- disable Spotbugs -->
+    <spotbugs.skip>true</spotbugs.skip>
+
     <!-- dependency version -->
     <junit.version>4.13.2</junit.version>
     <log4j.version>2.20.0</log4j.version>
@@ -148,6 +155,7 @@
                 <goal>testCompile</goal>
               </goals>
               <configuration>
+                <release />
                 <scalaVersion>${scala.version}</scalaVersion>
                 <!-- disabling zinc, since it is causing compilation failures -->
                 <recompileMode>all</recompileMode>
@@ -157,6 +165,26 @@
           </executions>
         </plugin>
 
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-toolchains-plugin</artifactId>
+          <version>3.1.0</version>
+          <configuration>
+            <toolchains>
+              <jdk>
+                <version>[1.8,9)</version>
+              </jdk>
+            </toolchains>
+          </configuration>
+          <executions>
+            <execution>
+              <goals>
+                <goal>toolchain</goal>
+              </goals>
+            </execution>
+          </executions>
+        </plugin>
+
       </plugins>
     </pluginManagement>