maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <>
Subject [jira] (MDEPLOY-172) Concurrency problem with deployAtEnd in parallel builds
Date Sat, 09 Nov 2013 15:47:20 GMT


Robert Scholte closed MDEPLOY-172.

       Resolution: Fixed
    Fix Version/s: 2.9
         Assignee: Robert Scholte

I did a small changes because a couple of integration tests failed when running {{mvn verify
The plugin wasn't logging when projects were deployed at end.
Fixed in [r1540334|]
> Concurrency problem with deployAtEnd in parallel builds
> -------------------------------------------------------
>                 Key: MDEPLOY-172
>                 URL:
>             Project: Maven Deploy Plugin
>          Issue Type: Bug
>          Components: deploy:deploy
>    Affects Versions: 2.8.1
>            Reporter: Hermann Josef Hill
>            Assignee: Robert Scholte
>             Fix For: 2.9
>         Attachments: deploy-plugin.patch
> In the method {{execute()}} of the class {{DeployMojo}}, the counter {{readyProjectsCounter}}
is used to find the last project to be deployed. Unfortunately the counter is incremented
*before* the deployment request is added to the queued {{deployRequests}}. This may lead to
a race condition where requests are added to {{deployRequests}} after the execution of the
queued requests. When this happens to a module that should be deployed, it will *not* be deployed.
> Example scenario:
> Think of a parallel build of a reactor with only two modules A and B where the execution
of the deploy plugin for module A is stopped by a context change directly after the line that
sets {{projectsReady}}. The counter {{readyProjectsCounter}} is now one step before the "finish
> If the deploy plugin for module B is executed now, it will set {{projectsReady}}, enqueue
its own deployment request and then execute all enqueued deployment requests. The deployment
request for A is not enqueued at this point, so it can't be executed - and the deploy plugin
for module A won't execute it because it thinks "it will be executed later".
> Granted, the window of vulnerability is rather small, but such bugs tend to bite you

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message