Skip to content

Maven 4 warnings from spring-boot-dependencies #42015

@lprimak

Description

@lprimak

This issue was introduced in SpringBoot 3.2.0 and later

Reproducer: https://github.com/apache/shiro/tree/main/samples/spring-boot-3-web

Warnings

mvnd clean package
[INFO] Processing build on daemon 539d9af4
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for 'org.apache.shiro.samples:samples-spring-boot-3-web:war:2.0.0-SNAPSHOT'
[WARNING] Ignored POM import for: org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.10.2@compile as already imported org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.11.0@compile.  Add a the conflicting managed dependency directly to the dependencyManagement section of the POM. @ org.springframework.boot:spring-boot-dependencies:3.3.3, /Users/lprimak/.m2/repository/org/springframework/boot/spring-boot-dependencies/3.3.3/spring-boot-dependencies-3.3.3.pom
[WARNING] Ignored POM import for: org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.7.0@compile as already imported org.apache.maven.plugin-tools:maven-plugin-annotations:jar:3.11.0@compile.  Add a the conflicting managed dependency directly to the dependencyManagement section of the POM. @ org.springframework.boot:spring-boot-dependencies:3.3.3, /Users/lprimak/.m2/repository/org/springframework/boot/spring-boot-dependencies/3.3.3/spring-boot-dependencies-3.3.3.pom

Solution: Add explicit artifact to spring-boot-dependencies.pom (dependencyManagement section):

      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>3.12.0</version>
      </dependency>

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectFor an external project and not something we can fixstatus: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions