| Title: Java API Compliance Checker Instructions |
| Notice: Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| . |
| http://www.apache.org/licenses/LICENSE-2.0 |
| . |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| |
| There is a tool that can analyze the difference between APIs called |
| japi-compliance[1]. This tool is useful for checking API compatability of |
| different Accumulo versions. To run this tool edit the xml files to specify |
| the location of accumulo core jars and set the library version. Then run the |
| following command. |
| |
| japi-compliance-checker.pl -skip-deprecated -old japi-accumulo-1.5.xml -new japi-accumulo-1.6.xml -l accumulo |
| |
| Optionally, you can use the --skip-classes argument with the provided exclude_classes.txt file to skip classes from |
| org.apache.accumulo.core.data that aren't in the public API. |
| |
| This directory should have a library configuration file for each release on supported lines as well as an in-progress |
| for whatever version is currently the master branch. The examples below all make use of version-specific library definitions. |
| |
| When looking at a patch release, you should verify that changes introduced are forwards and backwards compatible, per |
| semver. |
| |
| # Backwards compatibility from x.y.z to x.y.(z+1) |
| japi-compliance-checker.pl -old japi-accumulo-1.6.1.xml -new japi-accumulo-1.6.2.xml -l accumulo --skip-classes=exclude_classes.txt |
| # Forwards compatibility from x.y.z to x.y.(z+1). Note that the old / new arguments have been swapped. |
| japi-compliance-checker.pl -new japi-accumulo-1.6.1.xml -old japi-accumulo-1.6.2.xml -l accumulo --skip-classes=exclude_classes.txt |
| |
| When looking at a minor release, you should verify that change are backwards compatible, per semver. |
| |
| # Backwards compatibility from x.y.z to x.(y+1).0 |
| japi-compliance-checker.pl -old japi-accumulo-1.6.1.xml -new japi-accumulo-1.7.0.xml -l accumulo --skip-classes=exclude_classes.txt |
| |
| When looking at a major release, you should examine removals to make sure they are not capricious. Specifically, you should ensure that |
| they have been deprecated for a full major version. |
| |
| # Advisory backwards compatibility check from x.y.z to (x+1).0.0 |
| japi-compliance-checker.pl -old japi-accumulo-1.7.0.xml -new japi-accumulo-2.0.0.xml -l accumulo --skip-classes=exclude_classes.txt |
| |
| [1]: http://ispras.linuxbase.org/index.php/Java_API_Compliance_Checker |
| |