This is an automated email from the ASF dual-hosted git repository. iemejia pushed a commit to branch avro-4251-japicmp-backwards-compatibility in repository https://gitbox.apache.org/repos/asf/avro.git
commit 29ce04d9fafdf560391e0cdc2076b9dbc0a78ee1 Author: Ismaël Mejía <[email protected]> AuthorDate: Thu Apr 9 07:12:25 2026 +0000 AVRO-4251: [Java] Validate backwards compatibility issues with japicmp --- .github/workflows/test-lang-java.yml | 4 ++++ lang/java/pom.xml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/.github/workflows/test-lang-java.yml b/.github/workflows/test-lang-java.yml index 3d455f7e6b..428a8859ca 100644 --- a/.github/workflows/test-lang-java.yml +++ b/.github/workflows/test-lang-java.yml @@ -82,6 +82,10 @@ jobs: working-directory: . run: mvn -B clean install -PskipQuality -DskipTests + - name: "Check Java API Backward Compatibility" + if: matrix.os == 'ubuntu-latest' + run: mvn -B -PskipQuality -DskipTests com.github.siom79.japicmp:japicmp-maven-plugin:cmp + - name: "Test Reproducible Build" working-directory: . run: mvn clean verify -PskipQuality artifact:compare diff --git a/lang/java/pom.xml b/lang/java/pom.xml index f6d04ccc9e..3a6291fc09 100644 --- a/lang/java/pom.xml +++ b/lang/java/pom.xml @@ -67,6 +67,7 @@ <cyclonedx-maven-plugin.version>2.9.1</cyclonedx-maven-plugin.version> <exec-plugin.version>3.6.3</exec-plugin.version> <file-management.version>3.2.0</file-management.version> + <japicmp-maven-plugin.version>0.25.6</japicmp-maven-plugin.version> <javacc-plugin.version>3.8.0</javacc-plugin.version> <javacc.version>7.0.13</javacc.version> <maven-antrun-plugin.version>3.2.0</maven-antrun-plugin.version> @@ -268,6 +269,40 @@ <artifactId>cyclonedx-maven-plugin</artifactId> <version>${cyclonedx-maven-plugin.version}</version> </plugin> + <plugin> + <groupId>com.github.siom79.japicmp</groupId> + <artifactId>japicmp-maven-plugin</artifactId> + <version>${japicmp-maven-plugin.version}</version> + <configuration> + <parameter> + <accessModifier>public</accessModifier> + <onlyModified>true</onlyModified> + <breakBuildOnSourceIncompatibleModifications>true</breakBuildOnSourceIncompatibleModifications> + <breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications> + <skipXmlReport>true</skipXmlReport> + <excludes> + <exclude>org.apache.avro.ipc.jetty.StaticServlet</exclude> + </excludes> + <excludeModules> + <excludeModule>avro-integration-test</excludeModule> + <excludeModule>avro-interop-data-test</excludeModule> + <excludeModule>avro-maven-plugin</excludeModule> + <excludeModule>avro-perf</excludeModule> + <excludeModule>avro-tools</excludeModule> + <excludeModule>avro-service-archetype</excludeModule> + </excludeModules> + </parameter> + </configuration> + <executions> + <execution> + <id>japicmp-check</id> + <phase>verify</phase> + <goals> + <goal>cmp</goal> + </goals> + </execution> + </executions> + </plugin> </plugins> </pluginManagement> <plugins>
