Skip to content

[MPLUGIN-531] Fail the build if mixing v3 and v4 annotations and enforce v4 annotations when requiring Maven 4 or above #836

Open

Description

@jira-importer

Konrad Windszus opened MPLUGIN-531 and commented

The https://github.com/apache/maven-plugin-tools/blob/master/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java should fail the build in case
v3 (1.0/1.1 descriptor, https://github.com/apache/maven-plugin-tools/tree/master/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations) and v4 (2.0 descriptor) annotations (https://github.com/apache/maven-plugin-tools/tree/master/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations) are mixed in a single project.

This leads to unexpected behaviour like Component no longer being evaluated among others.

Also it should not be possible to generate v2.0 descriptors with v3 annotations (currently possible via

). V3 annotations should only support requirements up to (excluding) Maven 4 and v4 annotations should require Maven 4 or above. If the Maven requirements don't match the used annotation package the build should fail as well.


Issue Links:

  • MPLUGIN-530 Deprecate o.a.m.plugins.annotations.Component

  • MPLUGIN-523 Split Maven3 and Maven4 support

  • MPLUGIN-532 Fail the build in case JSR330 annotations are used in v4 plugins

Activity

  1. added
    enhancement
    priority:major
    on Jun 19, 2025
  2. removed
    priority:major
    on Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions