Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[master][MNG-7156][MNG-7285] Add locking in MojoExecutor #627

Merged
merged 7 commits into from
Dec 17, 2021

Conversation

gnodet
Copy link
Contributor

@gnodet gnodet commented Dec 2, 2021

https://issues.apache.org/jira/browse/MNG-7156
https://issues.apache.org/jira/browse/MNG-7285

Hopefully supersedes #476, #578, #625 in order to fix the threading problems in MavenProject during parallel builds.
This may need to be combined with #570 and apache/maven-integration-testing#127

@@ -202,6 +210,80 @@ private void execute( MavenSession session, MojoExecution mojoExecution, Project
}
}

try ( ProjectLock lock = new ProjectLock( session, mojoDescriptor, aggregatorLock ) )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This totally looks like SyncContext in Resolver. @cstamas

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think leveraging the AutoCloseable makes sense here, but it's just a syntactic trick to avoid the finally block...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A real example when things "click" into their place...

@gnodet gnodet changed the title [MNG-7156][MNG-7285] Add locking in MojoExecutor [master][MNG-7156][MNG-7285] Add locking in MojoExecutor Dec 3, 2021
@gnodet gnodet requested a review from michael-o December 13, 2021 09:16
@gnodet gnodet merged commit 33aedfc into apache:master Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants