Skip to content
Uwe Schindler edited this page Mar 14, 2015 · 32 revisions

Policeman's Forbidden API checker

This project implements the ANT task (+ Maven Mojo) announced in the Generics Policeman Blog. It checks Java byte code against a list of "forbidden" API signatures.

A new Tool for the Policeman

I started to hack a tool as a custom Apache Ant task using ASM (Lightweight Java Bytecode Manipulation Framework). The idea was to provide a list of methods signatures, field names and plain class names that should fail the build, once bytecode accesses it in any way. A first version of this task was published in as Apache Lucene issue LUCENE-4199, later improvements was to add support for fields (LUCENE-4202) and a sophisticated signature expansion to also catch calls to subclasses of the given signatures (LUCENE-4206).

About the Github project

This project was started as a fork of the internal Apache Ant Task. It additionally provides a Apache Maven Mojo, that can check your application classes against forbidden signatures, too.

The Apache Ant and Apache Maven Mojo are available for download or use with Maven/Ivy through Maven Central and Sonatype repositories. Nightly snapshot builds are done by the Policeman Jenkins Server and can be downloaded from the Sonatype Snapshot repository.

News

The current version is 1.7, released on 2014-11-24. Changes for each released version are listed on the following page: Changes

Documentation

Clone this wiki locally