You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "jira-importer (via GitHub)" <gi...@apache.org> on 2025/04/02 07:07:29 UTC
[I] [MDEPLOY-172] Concurrency problem with deployAtEnd in parallel builds [maven-deploy-plugin]
jira-importer opened a new issue, #353:
URL: https://github.com/apache/maven-deploy-plugin/issues/353
**[Hermann Josef Hill](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=hjhill)** opened **[MDEPLOY-172](https://issues.apache.org/jira/browse/MDEPLOY-172?redirect=false)** and commented
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 line".
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 unexpectedly...
---
**Affects:** 2.8.1
**Attachments:**
- [deploy-plugin.patch](https://issues.apache.org/jira/secure/attachment/12715276/deploy-plugin.patch) (_1.58 kB_)
**Issue Links:**
- [MINSTALL-103](https://issues.apache.org/jira/browse/MINSTALL-103) Concurrency problem with installAtEnd in parallel builds
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [MDEPLOY-172] Concurrency problem with deployAtEnd in parallel builds [maven-deploy-plugin]
Posted by "jira-importer (via GitHub)" <gi...@apache.org>.
jira-importer commented on issue #353:
URL: https://github.com/apache/maven-deploy-plugin/issues/353#issuecomment-2771533624
**[Robert Scholte](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rfscholte)** commented
Thanks!
I did a small changes because a couple of integration tests failed when running `mvn verify -Prun-its`
The plugin wasn't logging when projects were deployed at end.
Fixed in [r1540334](http://svn.apache.org/r1540334)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org