Skip to content

Maven 3.9.10 duplicates projects in parallel build #2487

@alzimmermsft

Description

@alzimmermsft

Affected version

3.9.10

Bug description

We have a build attempting to parallelize work, using -T 1C, while only building part of a larger set of projects, using --pl, which is now hitting an odd bug where the same project is built multiple times.

The following command is being ran (seen both on Linux in CI and on Window on my local machine):

mvn clean verify -f pom.xml --fail-at-end "-Dmaven.javadoc.skip=true" "-Dcodesnippet.skip=true" "-Dspotbugs.skip=true" "-Dcheckstyle.skip=true" "-Drevapi.skip=true" -DtrimStackTrace=false "-Dspotless.apply.skip=true" "-Dspotless.check.skip=true" -pl "com.azure:azure-core-http-vertx,com.azure:azure-core-tracing-opentelemetry-samples,com.azure:azure-core-perf,com.azure:perf-test-core,com.azure:azure-core" -DAZURE_TEST_DEBUG=false -Dparallel-test-playback=true -DcreateSourcesJar=false -T 1C

On the following POM file:

https://github.com/Azure/azure-sdk-for-java/blob/main/pom.xml

At some point in the build I see the following output:

Image

Where azure-core-perf is being built three times, and seeing 6/5 projects being built, which eventually results in the build failing.

Running the build without parallelization works, as well as reverting back to Mavan 3.9.6 (the other version I have on my local machine).

Additionally, what is odd, adding more projects to the project list doesn't run into this problem either:

mvn clean verify -f pom.xml --fail-at-end "-Dmaven.javadoc.skip=true" "-Dcodesnippet.skip=true" "-Dspotbugs.skip=true" "-Dcheckstyle.skip=true" "-Drevapi.skip=true" -DtrimStackTrace=false "-Dspotless.apply.skip=true" "-Dspotless.check.skip=true" -pl "com.azure:azure-core,com.azure:azure-core-amqp,com.azure:azure-core-amqp-experimental,com.azure:azure-core-experimental,com.azure:azure-core-http-jdk-httpclient,com.azure:azure-core-http-netty,com.azure:azure-core-http-okhttp,com.azure:azure-core-http-vertx,com.azure:azure-core-management,com.azure:azure-core-metrics-opentelemetry,com.azure:azure-core-serializer-avro-apache,com.azure:azure-core-serializer-json-gson,com.azure:azure-core-serializer-json-jackson,com.azure:azure-core-test,com.azure:azure-core-tracing-opentelemetry,com.azure:azure-core-tracing-opentelemetry-samples,com.azure:azure-core-perf,com.azure:perf-test-core" -DAZURE_TEST_DEBUG=false -Dparallel-test-playback=true -DcreateSourcesJar=false -T 1C

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions