All Projects → siom79 → Japicmp

siom79 / Japicmp

Licence: apache-2.0
Comparison of two versions of a jar archive

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Japicmp

Chn Eolinker Ams Lite 4.0 For Php
中国最大的在线API管理平台EOLINKER 旗下API管理系统开源精简版,适合个人以及微型团队使用。
Stars: ✭ 869 (+77.35%)
Mutual labels:  api-documentation, api-management
Chn Eolinker Ams Lite 4.0 For Java
中国最大的API接口管理平台,3.x开源发行版,支持多国语言[英语、简体中文、繁体中文]
Stars: ✭ 275 (-43.88%)
Mutual labels:  api-documentation, api-management
Eolinker Api Management 2.x For Php
全球领先API接口管理平台,2.x开源稳定版
Stars: ✭ 211 (-56.94%)
Mutual labels:  api-documentation, api-management
Nei Toolkit
NEI 接口文档管理平台配套自动化工具
Stars: ✭ 781 (+59.39%)
Mutual labels:  api-documentation, api-management
Api Development Tools
📚 A collection of useful resources for building RESTful HTTP+JSON APIs.
Stars: ✭ 2,519 (+414.08%)
Mutual labels:  api-documentation, api-management
nei-toolkit
NEI 接口文档管理平台配套自动化工具
Stars: ✭ 814 (+66.12%)
Mutual labels:  api-management, api-documentation
platform
Apinf - Open source API management platform with multi proxy and protocol support
Stars: ✭ 69 (-85.92%)
Mutual labels:  api-management, api-documentation
node-slate
📓 Node.js port of lord/slate
Stars: ✭ 18 (-96.33%)
Mutual labels:  api-documentation
Rust Os Comparison
A comparison of operating systems written in Rust
Stars: ✭ 292 (-40.41%)
Mutual labels:  comparison
eoLinker
在线 API 研发管理测试工具,最后能用的开源修复版本(4.0.1本地测试插件兼容3.5与4.0版本)。
Stars: ✭ 62 (-87.35%)
Mutual labels:  api-documentation
Raml Spec
RAML Specification
Stars: ✭ 3,759 (+667.14%)
Mutual labels:  api-documentation
Semver
Semantic version parsing and comparison.
Stars: ✭ 283 (-42.24%)
Mutual labels:  comparison
catch-lest-other-comparison
Tabularised feature comparison between Catch, doctest and lest C++ test frameworks
Stars: ✭ 20 (-95.92%)
Mutual labels:  comparison
case-insensitive
Case insensitive string comparison
Stars: ✭ 24 (-95.1%)
Mutual labels:  comparison
Ambassador
open source Kubernetes-native API gateway for microservices built on the Envoy Proxy
Stars: ✭ 3,583 (+631.22%)
Mutual labels:  api-management
HashCompare
Compare various different Hashing Algorithms
Stars: ✭ 18 (-96.33%)
Mutual labels:  comparison
Graphql Php
A PHP port of GraphQL reference implementation
Stars: ✭ 4,219 (+761.02%)
Mutual labels:  api-management
phpdoc-vuepress
🎨 Template for generating your PHP API documentation in a pretty VuePress format
Stars: ✭ 19 (-96.12%)
Mutual labels:  api-documentation
Apisix Dashboard
Dashboard for Apache APISIX
Stars: ✭ 268 (-45.31%)
Mutual labels:  api-management
Ghlocalapi
(Unofficial) Google Home local API documentation.
Stars: ✭ 334 (-31.84%)
Mutual labels:  api-documentation

The website is located at https://siom79.github.io/japicmp.

japicmp

japicmp is a tool to compare two versions of a jar archive:

java -jar japicmp-0.15.3-jar-with-dependencies.jar -n new-version.jar -o old-version.jar

It can also be used as a library:

JarArchiveComparatorOptions comparatorOptions = new JarArchiveComparatorOptions();
JarArchiveComparator jarArchiveComparator = new JarArchiveComparator(comparatorOptions);
List<JApiClass> jApiClasses = jarArchiveComparator.compare(oldArchives, newArchives);

japicmp is available in the Maven Central Repository: mvnrepository

<dependency>
	<groupId>com.github.siom79.japicmp</groupId>
	<artifactId>japicmp</artifactId>
	<version>0.15.3</version>
</dependency>

A maven plugin allows you to integrate the checks into your build:

<plugin>
	<groupId>com.github.siom79.japicmp</groupId>
	<artifactId>japicmp-maven-plugin</artifactId>
	<version>0.15.3</version>
	<configuration>
		<oldVersion>
			<dependency>
				<groupId>japicmp</groupId>
				<artifactId>japicmp-test-v1</artifactId>
				<version>${oldversion}</version>
				<type>jar</type>
			</dependency>
		</oldVersion>
		<newVersion>
			<file>
				<path>${project.build.directory}/${project.artifactId}-${project.version}.${project.packaging}</path>
			</file>
		</newVersion>
		<parameter>
			<!-- see documentation -->
		</parameter>
	</configuration>
	<executions>
		<execution>
			<phase>verify</phase>
			<goals>
				<goal>cmp</goal>
			</goals>
		</execution>
	</executions>
</plugin>

A Sonar Qube plugin integrates the results from the japicmp analysis into your code quality report: sonar-japicmp-plugin.

By using the available Ant task, you can also integrate japicmp into your Ant build files:

<taskdef resource="japicmp/ant/antlib.xml" classpathref="task.classpath"/>
<japicmp oldjar="${project.build.directory}/guava-18.0.jar"
	 newjar="${project.build.directory}/guava-19.0.jar"
	 oldclasspathref="old.classpath"
	 newclasspathref="new.classpath"
	 onlybinaryincompatiblemodifications="false"
	 onlyModifications="true"
	 />

melix has developed a gradle plugin for japicmp.

Motivation

Every time you release a new version of a library or a product, you have to tell your clients or customers what has changed in comparison to the last release. Without the appropriate tooling, this task is tedious and error-prone. This tool/library helps you to determine the differences between the java class files that are contained in two given jar archives.

This library does not use the Java Reflection API to compute the differences, as the usage of the Reflection API makes it necessary to include all classes the jar archive under investigation depends on are available on the classpath. To prevent the inclusion of all dependencies, which can be a lot of work for bigger applications, this library makes use of the javassist library to inspect the class files. This way you only have to provide the two jar archives on the command line (and eventually libraries that contain classes/interfaces you have extended/implemented).

This approach also detects changes in instrumented and generated classes. You can even evaluate changes in class file attributes (like synthetic) or annotations. The comparison of annotations makes this approach suitable for annotation-based APIs like JAXB, JPA, JAX-RS, etc.

The goal of this project is to provide a fast and easy to use API comparison for Java. Therefore it does not aim to integrate change tracking of other types of artifacts (configuration files, etc.) as a generic implementation means to make compromises in terms of performance and ease of usage. japicmp for example compares two archives with about 1700 classes each in less than one second and therewith can be easily integrated in each build.

Features

  • Comparison of two jar archives without the need to add all of their dependencies to the classpath.
  • Differences are printed on the command line in a simple diff format.
  • Differences can optionally be printed as XML or HTML file.
  • Per default private and package protected classes and class members are not compared. If necessary, the access modifier of the classes and class members to be compared can be set to public, protected, package or private.
  • Per default all classes are tracked. If necessary, certain packages, classes, methods or fields can be excluded or explicitly included. Inclusion and exclusion is also possible based on annotations.
  • All changes between all classes/methods/fields are compared. japicmp differentiates between source and binary compatible changes (as described in the Java Language Specification and this Oracle blog).
  • All changes between annotations are compared, hence japicmp can be used to track annotation-based APIs like JAXB, JPA, JAX-RS, etc.
  • A maven plugin is available that allows you to compare the current artifact version with some older version from the repository.
  • The option --semantic-versioning tells you which part of the version you have to increment in order to follow semantic versioning.
  • If a class is serializable, changes are evaluated regarding the Java Object Serialization Specification.
  • Per default synthetic classes and class members (e.g. bridge methods) are hidden. They can be listed by using the option --include-synthetic.
  • The maven plugin allows project-specific filtering and reports using a custom Groovy script.

Downloads

You can download the latest version from the release page or directly from the maven central repository.

Development

  • Build Status

Reports

Use the maven site plugin (mvn site) to generate the following reports:

  • findbugs
  • checkstyle
  • japicmp
  • cobertura test coverage

Release

This is the release procedure:

  • Update ReleaseNotes.md.
  • Increment version in README.md.
  • Run release build (substitute passphrase with your GPG password):
mvn release:clean release:prepare -DautoVersionSubmodules=true -Dgpg.passphrase=passphrase
mvn release:perform -Dgpg.passphrase=passphrase
  • Login to Sonatype's Nexus repository
    • Download released artifact from staging repository.
    • Close and release staging repository if sanity checks are successful.
  • Update maven site report.

The second and third step can also be automated using the python script release.py in the root directory:

python3 release.py --gpg-passphrase <gpgpassphrase> --dry-run --new-version <new-version> --release-version <release-version> --release-tag <release-tag> --old-version <old-version>

Contributions

Pull requests are welcome, but please follow these rules:

  • The basic editor settings (indentation, newline, etc.) are described in the .editorconfig file (see EditorConfig).
  • Provide a unit test for every change.
  • Name classes/methods/fields expressively.
  • Fork the repo and create a pull request (see GitHub Flow).

Website

The website can be generated by using the maven-site-plugin:

mvn site:site
mvn site:stage
cp -r target/staging $SIOM79_GITHUB_IO_REPO
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].