Skip to content

Add rule to ban dependencies with specific version qualifiers #938

@ms-f10

Description

@ms-f10

New feature, improvement proposal

I would like to request a new enforcer rule (or enhancement to existing rules) that can ban dependencies based on version qualifiers/suffixes, independent of the specific version number.

Current Limitation:

The BannedDependencies rule currently cannot match version qualifiers flexibly. I attempted the following configuration:

<bannedDependencies>
    <excludes>
        <exclude>a.b.c*:*:*-a*</exclude>
        <exclude>a.b.c*:*:*-m*</exclude>
        <exclude>a.b.c*:*:*-rc*</exclude>
    </excludes>
</bannedDependencies>

However, based on the ArtifactMatcher implementation, the version field does not support wildcard matching for qualifiers in this way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions