Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AVRO-3978: Build with Java 11 minimum #2855

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 4 additions & 6 deletions .github/workflows/test-lang-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-

- name: 'Setup Temurin JDK 8, 11, 17 & 21'
- name: 'Setup Temurin JDK 11, 17 & 21'
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: |
8
11
17
21
Expand Down Expand Up @@ -93,12 +92,11 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-

- name: 'Setup Temurin JDK 8, 11, 17 & 21'
- name: 'Setup Temurin JDK 11, 17 & 21'
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
distribution: 'temurin'
java-version: |
8
11
17
21
Expand Down Expand Up @@ -149,10 +147,10 @@ jobs:
working-directory: .
run: mvn -B install -PskipQuality

- name: 'Generate Interop Data using Java 8, 11, 17 & 21'
- name: 'Generate Interop Data using Java 11, 17 & 21'
working-directory: lang/java/interop-data-test
run: mvn -B verify -Pgenerate-test-data

- name: 'Run Interop Tests using Java 8, 11, 17 & 21'
- name: 'Run Interop Tests using Java 11, 17 & 21'
working-directory: lang/java/interop-data-test
run: mvn -B verify -Pcheck-test-data
8 changes: 4 additions & 4 deletions doc/examples/java-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
Expand All @@ -75,8 +75,8 @@
<artifactId>maven-plugin</artifactId>
<version>${avro.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
</plugins>
Expand Down
4 changes: 2 additions & 2 deletions doc/examples/mr-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
Expand Down
20 changes: 0 additions & 20 deletions lang/java/avro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,26 +150,6 @@
</goals>
</execution>

<execution>
<id>Run all tests under Java 8</id>
<goals>
<goal>run</goal>
</goals>
<configuration>
<filterProperties>
<integrationTestingJDK>8</integrationTestingJDK>
<!-- Mockito 5 (used in all other cases) requires Java 11 -->
<!-- This is the last version that still runs on Java 8 -->
<mockito.version>4.11.0</mockito.version>
</filterProperties>
<properties>
<maven.compiler.release/>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<cloneProjectsTo>${project.build.directory}/it-jdk-8</cloneProjectsTo>
</configuration>
</execution>

<execution>
<id>Run all tests under Java 11</id>
<goals>
Expand Down
17 changes: 0 additions & 17 deletions lang/java/interop-data-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,6 @@
</goals>
</execution>

<execution>
<id>${invoker-action} under Java 8</id>
<goals>
<goal>run</goal>
</goals>
<configuration>
<filterProperties>
<integrationTestingJDK>8</integrationTestingJDK>
</filterProperties>
<properties>
<maven.compiler.release/>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<cloneProjectsTo>${project.build.directory}/it-jdk-8</cloneProjectsTo>
</configuration>
</execution>

<execution>
<id>${invoker-action} under Java 11</id>
<goals>
Expand Down
2 changes: 1 addition & 1 deletion lang/java/interop-data-test/src/it/check/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.outputEncoding>UTF-8</project.build.outputEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.source>11</maven.compiler.source>

<main.basedir>../../../../../..</main.basedir>
<interop.datadir>${main.basedir}/build/interop/data/</interop.datadir>
Expand Down
2 changes: 1 addition & 1 deletion lang/java/interop-data-test/src/it/generate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.outputEncoding>UTF-8</project.build.outputEncoding>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.source>11</maven.compiler.source>

<main.basedir>../../../../../..</main.basedir>

Expand Down
1 change: 0 additions & 1 deletion lang/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<links>
<link>https://docs.oracle.com/javase/8/docs/api/</link>
<link>https://hadoop.apache.org/docs/current/api/</link>
</links>
<tagletArtifacts>
Expand Down
6 changes: 6 additions & 0 deletions lang/java/thrift/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@
<artifactId>libthrift</artifactId>
<version>${thrift.version}</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
<scope>test</scope>
</dependency>
</dependencies>

</project>
23 changes: 5 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
Java artifacts are copied to the final build destination with a custom profile.
-->
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.release>8</maven.compiler.release>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.release>11</maven.compiler.release>
<main.basedir>${project.basedir}</main.basedir>
<avro.distDir>dist</avro.distDir>
<avro.docDir>build/avro-doc-${project.version}/api</avro.docDir>
Expand All @@ -51,7 +51,7 @@
<checkstyle-plugin.version>3.3.1</checkstyle-plugin.version>
<checkstyle.version>10.15.0</checkstyle.version>
<enforcer-plugin.version>3.4.1</enforcer-plugin.version>
<extra-enforcer-rules.version>1.7.0</extra-enforcer-rules.version>
<extra-enforcer-rules.version>1.8.0</extra-enforcer-rules.version>
<maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven-gpg-plugin.version>3.2.3</maven-gpg-plugin.version>
Expand Down Expand Up @@ -180,19 +180,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<executions>
<execution>
<id>Ensure ToolChain for JDK 8 is available</id>
<goals>
<goal>toolchain</goal>
</goals>
<configuration>
<toolchains>
<jdk>
<version>8</version>
</jdk>
</toolchains>
</configuration>
</execution>
<execution>
<id>Ensure ToolChain for JDK 11 is available</id>
<goals>
Expand Down Expand Up @@ -248,13 +235,13 @@
<configuration>
<rules>
<enforceBytecodeVersion>
<maxJdkVersion>8</maxJdkVersion>
<maxJdkVersion>11</maxJdkVersion>
<ignoredScopes>
<ignoredScope>test</ignoredScope>
<ignoredScope>provided</ignoredScope>
</ignoredScopes>
<!--
Multi release jars that are Java 8 compatible should pass,
Multi release jars that are Java 11 compatible should pass,
but the extra-enforcer-plugin does not detect them
correctly so we should ignore them explicitly.
-->
Expand Down