You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Nodet (Jira)" <ji...@apache.org> on 2022/10/20 08:11:02 UTC

[jira] [Updated] (MNG-5571) Instructions to resume the build can be misleading with -T parallel builds

     [ https://issues.apache.org/jira/browse/MNG-5571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated MNG-5571:
---------------------------------
    Fix Version/s: 4.0.0-alpha-2

> Instructions to resume the build can be misleading with -T parallel builds
> --------------------------------------------------------------------------
>
>                 Key: MNG-5571
>                 URL: https://issues.apache.org/jira/browse/MNG-5571
>             Project: Maven
>          Issue Type: Bug
>            Reporter: Derek Lewis
>            Assignee: Maarten Mulders
>            Priority: Minor
>              Labels: needs-attention
>             Fix For: 4.0.0-alpha-1, 4.0.0-alpha-2, 4.0.0
>
>         Attachments: resume-from-testcase.zip
>
>
> In a project with many modules that are able to build in parallel, if one fails the build, the output says to use -rf to resume from that module.  However, this may not run the other modules that were running in parallel.  If one of those modules also had failures, but had not yet reached those failures during the first build, and those modules aren't build in the second build, the build will pass, despite these 'hidden' errors.
> In the example I've attached, there are four submodules, a, b, c and d. Module d depends on a, b, and c, and all modules share a common parent module.
> The properties fail.a, fail.b, and fail.c will cause the respective module to fail.
> Build first with just "mvn install -T4".
> Next, imagine making a change in modules a, b, and c that break them, and build with "mvn install -T4 -Dfail.a -Dfail.b -Dfail.c"
> Due to the timing in the test poms (using antrun sleep), this should print:
> {noformat}
> [ERROR] After correcting the problems, you can resume the build with the command
> [ERROR]   mvn <goals> -rf :c
> {noformat}
> Above that, you will see it reporting the failure of all three modules, but in a lot of cases where there are surefire tests failing, it's extremely difficult to tell that more than one module failed.  As a result, I generally just look at the module it's told me to resume from, to find failures.
> So, pretend you've done that, but the errors in a and b remain, and run "mvn install -T4 -Dfail.a -Dfail.b -rf :c" as it's suggested.
> The build passes, giving a false sense of confidence.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)