typetools / typetools/checker-framework
Custom qualifiers and Maven setup
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
Hey!
I'm trying to recreate the example with a custom qualifier from the documentation, but with a Maven setup, and I'm failing.
error: SubtypingChecker: could not load class for annotation: org.example.safe.qualifiers.Encrypted. Ensure that it is a type annotation and your classpath is correct.
Since I need to compile qualifiers before I start to compile other code, what is the recommended way to have to set this up? Using Maven Modules?
https://checkerframework.org/manual/#subtyping-example
https://checkerframework.org/manual/#maven
This is my change to maven pom:
<annotationProcessors>
<annotationProcessor>org.checkerframework.common.subtyping.SubtypingChecker</annotationProcessor>
</annotationProcessors>
<compilerArgs>
<arg>-Xmaxerrs</arg><arg>10000</arg>
<arg>-Xmaxwarns</arg><arg>10000</arg>
<arg>-Aquals=org.example.safe.qualifiers.Encrypted,org.example.safe.qualifiers.PossiblyUnencrypted</arg>
</compilerArgs>
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Maven and subtyping sections of the Checker Framework manual, then inspect the reported Maven pom configuration and reproduce the classpath error. Determine the recommended setup for compiling custom qualifiers before dependent code; done means the linked custom-qualifier example compiles with Maven.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100