Skip to content

Commit bb99c1a

Browse files
authored
Merge pull request #11487 from IQSS/enforce-java-17
Fix @autoservice classes not being loaded at runtime when using JDK23+ for compilation
2 parents 2ce6955 + c27c57b commit bb99c1a

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

doc/sphinx-guides/source/developers/dev-environment.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Detailed Steps
3030
Install Java
3131
~~~~~~~~~~~~
3232

33-
The Dataverse Software requires Java 17.
33+
The recommended version is Java 17 because it's the version we test with. See https://github.com/IQSS/dataverse/pull/9764.
3434

3535
On Mac and Windows, we suggest using `SDKMAN <https://sdkman.io>`_ to install Temurin (Eclipe's name for its OpenJDK distribution). Type ``sdk install java 17`` and then hit the "tab" key until you get to a version that ends with ``-tem`` and then hit enter.
3636

doc/sphinx-guides/source/installation/prerequisites.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ We assume you plan to run your Dataverse installation on Linux and we recommend
1919
Java
2020
----
2121

22-
The Dataverse Software requires Java SE 17 (or higher).
22+
The recommended version is Java 17 because it's the version we test with.
2323

2424
Installing Java
2525
===============

pom.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
<reload4j.version>1.2.18.4</reload4j.version>
3030
<flyway.version>10.19.0</flyway.version>
31+
<auto-service.version>1.1.1</auto-service.version>
3132
<jhove.version>1.20.1</jhove.version>
3233
<poi.version>5.4.0</poi.version>
3334
<tika.version>2.9.2</tika.version>
@@ -526,7 +527,7 @@
526527
<dependency>
527528
<groupId>com.google.auto.service</groupId>
528529
<artifactId>auto-service</artifactId>
529-
<version>1.1.1</version>
530+
<version>${auto-service.version}</version>
530531
<optional>true</optional>
531532
<type>jar</type>
532533
</dependency>
@@ -831,6 +832,14 @@
831832
<release>${target.java.version}</release>
832833
<!-- for use with `mvn -DcompilerArgument=-Xlint:unchecked compile` -->
833834
<compilerArgument>${compilerArgument}</compilerArgument>
835+
<!-- Ensure the annotation processor for @AutoService is picked up. Especially important as of JDK 23 -->
836+
<annotationProcessorPaths>
837+
<path>
838+
<groupId>com.google.auto.service</groupId>
839+
<artifactId>auto-service</artifactId>
840+
<version>${auto-service.version}</version>
841+
</path>
842+
</annotationProcessorPaths>
834843
</configuration>
835844
</plugin>
836845
<plugin>

0 commit comments

Comments
 (0)