NAME¶japi-compliance-checker - Check backward compatibility of a Java library API
- Java API Compliance Checker (japi-compliance-checker) Check backward compatibility of a Java library API
- Java API Compliance Checker (JAPICC) is a tool for checking backward binary/source compatibility of a Java library API. The tool checks class declarations of old and new versions and analyzes changes that may break compatibility: removed class members, added abstract methods, etc.
- Break of the binary compatibility may result in crash or incorrect behavior of existing clients built with an old library version if they run with a new one. Break of the source compatibility may result in recompilation errors with a new library version.
- The tool is intended for developers of software libraries and maintainers of operating systems who are interested in ensuring backward compatibility, i.e. allow old clients to run or to be recompiled with newer library versions.
- This tool is free software: you can redistribute it and/or modify it under the terms of the GNU LGPL.
- japi-compliance-checker [options]
- japi-compliance-checker OLD.jar NEW.jar
- japi-compliance-checker OLD.jmod NEW.jmod
- japi-compliance-checker -lib NAME -old OLD.xml -new NEW.xml OLD.xml and NEW.xml are XML-descriptors:
- /path1/to/JAR(s) OR JMOD(s)/ /path2/to/JAR(s) OR JMOD(s)/ ...
- Print this help.
- Print version information.
- Print the tool version (2.4) and don't do anything else.
- Library name (without version).
- Descriptor of the 1st (old) library version. It may be one of the following:
- 1. Java archive (*.jar or *.jmod) 2. XML-descriptor (VERSION.xml file):
- /path1/to/JAR(s) OR JMOD(s)/ /path2/to/JAR(s) OR JMOD(s)/
- 3. API dump generated by -dump option
- If you are using *.jar or *.jmod as a descriptor then you should specify version numbers with -v1 and -v2 options too. If version numbers are not specified then the tool will try to detect them automatically.
- Descriptor of the 2nd (new) library version.
- This option allows to specify the client Java archive that should be checked for portability to the new library version.
- Show "Binary" compatibility problems only. Generate report to "bin_compat_report.html".
- Show "Source" compatibility problems only. Generate report to "src_compat_report.html".
- Specify 1st API version outside the descriptor. This option is needed if you have prefered an alternative descriptor type (see -d1 option).
- In general case you should specify it in the XML descriptor:
- Specify 2nd library version outside the descriptor.
- Specify the library version in the generated API dump.
- Treat all API compatibility warnings as problems.
- Do not skip checking of these packages:
- *impl* *internal* *examples*
- Do not check packages matched by the regular expression.
- Do not check types (classes and interfaces) matched by the regular expression. It's matched against full qualified type names (e.g. 'org.xyz.Name<T>'). It has to match any part of type name.
- Dump library API to gzipped TXT format file. You can transfer it anywhere and pass instead of the descriptor. Also it may be used for debugging the tool. PATH is the path to the Java archive or XML descriptor of the library.
- Check for changes in annotations like in any other interfaces.
- Check packages matched by the regular expression. Other packages will not be checked.
- This option allows to specify a file with a list of classes that should be checked, other classes will not be checked.
- Specifies a file with a list of annotations. The tool will check only classes annotated by the annotations from the list. Other classes will not be checked.
- Skip checking of classes annotated by the annotations in the list.
- Skip analysis of deprecated methods and classes.
- List of classes that should not be checked.
- List of packages that should not be checked.
- List of interfaces that should not be implemented by users.
- All interfaces should not be implemented by users.
- Do not list added/removed methods.
- Specify a *.dump file path where to generate an API dump. Default:
- Path to compatibility report. Default:
- Path to "Binary" compatibility report. Default:
- Path to "Source" compatibility report. Default:
- Quick analysis. Disabled:
- - analysis of method parameter names - analysis of class field values - analysis of usage of added abstract methods - distinction of deprecated methods and classes
- Enable sorting of data in API dumps.
- Show access level of non-public methods listed in the report.
- Hide template parameters in the report.
- Do nothing.
- Show package names in the report.
- The maximum number of affected methods listed under the description of the changed type in the report.
- Try to simplify formatting and reduce size of the report (for a big set of changes).
- Apply filters by annotations only to new version of the library.
- Apply filters by annotations only to old version of the library.
- Count total public methods in the API dump.
- Path to the API dump of the required dependency archive. It will be used to resolve overwritten methods and more.
- Generate old-style report.
- Run internal tests. Create two incompatible versions of a sample library and run the tool to check them for compatibility. This option allows to check if the tool works correctly in the current environment.
- Debugging mode. Print debug info on the screen. Save intermediate analysis stages in the debug directory:
- Also consider using -dump option for debugging the tool.
- Change library name in the report title to NAME. By default will be displayed a name specified by -l option.
- Path to the JDK install tree (e.g. /usr/lib/jvm/java-7-openjdk-amd64).
- Generate CSS styles file to PATH. This helps to save space when generating thousands of reports.
- Generate JS script file to PATH.
- Compatibility report will be generated to:
- 0 - Compatible. The tool has run without any errors. non-zero - Incompatible or the tool has run with errors.
AUTHOR¶Written by Andrey Ponomarenko.
COPYRIGHT¶Copyright © 2018 Andrey Ponomarenko's ABI Laboratory License: LGPLv2.1+ <http://www.gnu.org/licenses/> This program is free software: you can redistribute it and/or modify it.
|November 2018||japi-compliance-checker API Compliance Checker (JAPICC) 2.4|