Skip to content

Custom qualifiers and Maven setup #7387

@fritzfs

Description

@fritzfs

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions