Skip to content

Commit

Permalink
AVRO-3978: Upgrade main to build with Java 11 minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
jbonofre committed Apr 16, 2024
1 parent 50e48bc commit e585991
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 44 deletions.
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
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

0 comments on commit e585991

Please sign in to comment.