Skip to content

gunnarmorling/jdkapidiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JDK API Diff Report Generator

Note: This project has been migrated to the AdoptOpenJDK organization (https://github.com/AdoptOpenJDK/jdk-api-diff) and this repository is not actively maintained any longer.

This project creates a report of all API changes between two different JDK versions, e.g. JDK 8 and 9, using JapiCmp.

Published reports

Report created by this generator can be found here (excluding any unsupported Sun/Oracle/Apple modules):

Usage

To create the report yourself, e.g. with different settings, run mvn clean install. The API change report can be found at target/jdk-api-diff.html.

Maven Toolchains are used to locate the different JDKs. There must be a toolchain of type jdk for the JDKs to compare. Provide a file ~.m2/toolchains.xml like this:

<?xml version="1.0" encoding="UTF8"?>
<toolchains>
    <toolchain>
        <type>jdk</type>
        <provides>
            <version>1.8</version>
            <vendor>oracle</vendor>
        </provides>
        <configuration>
            <jdkHome>/path/to/jdk-1.8</jdkHome>
        </configuration>
    </toolchain>
    <toolchain>
        <type>jdk</type>
        <provides>
            <version>9</version>
            <vendor>oracle</vendor>
        </provides>
        <configuration>
            <jdkHome>/path/to/jdk-9</jdkHome>
        </configuration>
    </toolchain>
</toolchains>

Specify two properties, jdk1 and jdk2 in your pom.xml, identifying the base and target JDK version for the comparison. The values are comma-separated requirements matched against the <provides> configurations of the existing toolchain entries. Both properties must unambiguously identify one toolchain, for example:

<jdk1>version=9,vendor=oracle</jdk1>
<jdk2>version=10,vendor=oracle</jdk2>

If there's no matching toolchain or multiple ones match the given requirements, an exception will be raised.

The report is created via the ModuleRepackager class which is executed with the Maven exec plug-in. Adjust the following options passed to that class in pom.xml as needed:

  • --exported-packages-only: true or false, depending on whether only exported packages should be compared or all packages; only applies if both compared versions are Java 9 or later
  • --excluded-packages: a comma-separated listed of package names which should be excluded from the comparison

License

This project is licensed under the Apache License version 2.0.

Releases

No releases published

Packages

No packages published