Better instructions for working with Maven · Issue #445 · typetools/checker-framework
Hi. I submitted a few issues I had working with the checker framework, mostly due to the fact I was trying to avoid using the annotated JDK. The main reason for that was that I could not accept adding a system dependency (to a file somewhere in the local machine) or adding the jar to my source control to be able to refer to the annotated JDK jar.
After much trouble, I've come to a good solution that lets Maven take care of finding the jar and providing it to the checker framework.
I submit this issue as a request to add this to the documentation as the preferred way to use checker in Maven (similar approaches should work in Ant and Gradle).
First of all, to enable the checker framework, I simply add it as an annotation processor in the pom. This is done in the declaration of the maven-compiler-plugin. Then, I just add some compiler arguments that get passed to the NullnessChecker, like the location of my stubs (to annotate library methods), and importantly, the location of the annotated JDK in a system-independent, no setup way (Maven will download the jdk jar and figure out its location):
Read full article from Better instructions for working with Maven · Issue #445 · typetools/checker-framework
No comments:
Post a Comment