Skip to content

aspectj-compiler integration test fails under Maven 4 (console stdout prefixing) #508

Description

@ascheman

Building plexus-compiler with Maven 4.0.0-rc-6 fails one integration test, aspectj-compiler.

The IT's inner build is BUILD SUCCESS; it is the verify.groovy post-build script that fails, on:

assert content.contains( junitLog )   // junitLog = a raw, contiguous block of woven test output

Root cause

Maven 4's console reporter prefixes surefire lines with [INFO] and forked test stdout with [INFO] [stdout] . So in build.log the expected block appears as:

[INFO] Running org.acme.ApplicationTest
[INFO] [stdout] call(String org.acme.Application.greet(String))
[INFO] [stdout] execution(String org.acme.Application.greet(String))
...

and the unprefixed block is no longer a substring, so the assertion fails.

Scope

Maven-4-specific. On CI, 3.10.0-rc-1 passes and 4.0.0-rc-6 fails, and both ship the same maven-resolver (2.0.21) — so the trigger is Maven core / surefire console behaviour, not the resolver. Maven 3.9 / 3.10 print the block unprefixed, which is why the IT passes there.

Proposed fix

Strip the [INFO] / [INFO] [stdout] line prefixes before the contains check — a no-op under Maven 3, matching under Maven 4. PR to follow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions