Skip to content

Investigate problem with Maven Flatten Plugin and Maven 3.6.0 #16167

Closed
@wilkinsona

Description

@wilkinsona

When using Maven 3.6.0, the Flatten Plugin fails to create an effective pom as it is unable to resolve a milestone dependency. This failure occurs because it only has Maven Central available as a repository.

In Maven 3.5.4, all of the repositories configured in the pom are available because the project's remote repositories have been set on the project building request before it's used by the flatten plugin. This happens because there was no MavenProject found with a model ID of org.springframework.boot:spring-boot-build:${revision}.

In Maven 3.6.0, the repositories are not set on the project building request. They are not set because the different model ID is used when looking up the parent. Rather than org.springframework.boot:spring-boot-build:${revision} which is used in Maven 3.5.4, org.springframework.boot:spring-boot-build:2.2.0.BUILD-SNAPSHOT is used instead. The expansion of ${revision} into 2.2.0.BUILD-SNAPSHOT allows an existing entry in the projects map to be found.

Further investigation is needed. I've yet to determine if this is a regression in Maven, a bug in the Flatten Plugin, or if we're doing something wrong that only comes to light with Maven 3.6.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectFor an external project and not something we can fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions