Skip to content

Maven plugin fails when converting resources #2361

@deroffal

Description

@deroffal

Describe the bug
Hello!
Trying to upgrade to the new major release (Spring Boot 4, Spring Cloud 2025.1 and Spring Cloud Contract 5), I encounter an issue while trying to run my contract tests. When I execute mvn clean install (or more precisely mvn clean org.springframework.cloud:spring-cloud-contract-maven-plugin:5.0.0:convert), I get the following error:

[ERROR] Failed to execute goal org.springframework.cloud:spring-cloud-contract-maven-plugin:5.0.0:convert (default-convert) on project beer-api-producer: Execution default-convert of goal org.springframework.cloud:spring-cloud-contract-maven-plugin:5.0.0:convert failed: Cannot invoke "java.util.List.contains(Object)" because the return value of "org.apache.maven.shared.filtering.MavenResourcesExecution.getNonFilteredFileExtensions()" is null -> [Help 1]

Note that removing the clean goal and re-running the convert command a second time makes it work.

Sample
Can be reproduced using your sample here :
https://github.com/spring-cloud-samples/spring-cloud-contract-samples/tree/main/producer

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions