Class MojoExecutor.ProjectLock
- java.lang.Object
-
- org.apache.maven.lifecycle.internal.MojoExecutor.ProjectLock
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Enclosing class:
- MojoExecutor
private class MojoExecutor.ProjectLock extends java.lang.Object implements java.lang.AutoCloseable
Aggregating mojo executions (possibly) modify all MavenProjects, including those that are currently in use by concurrently running mojo executions. To prevent race conditions, an aggregating execution will block all other executions until finished. We also lock on a given project to forbid a forked lifecycle to be executed concurrently with the project. TODO: ideally, the builder should take care of the ordering in a smarter way TODO: and concurrency issues fixed with MNG-7157
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.concurrent.locks.Lock
acquiredAggregatorLock
(package private) MojoExecutor.OwnerReentrantLock
acquiredProjectLock
-
Constructor Summary
Constructors Constructor Description ProjectLock(MavenSession session, MojoDescriptor mojoDescriptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
private MojoExecutor.OwnerReentrantLock
getProjectLock(MavenSession session)
-
-
-
Field Detail
-
acquiredAggregatorLock
final java.util.concurrent.locks.Lock acquiredAggregatorLock
-
acquiredProjectLock
final MojoExecutor.OwnerReentrantLock acquiredProjectLock
-
-
Constructor Detail
-
ProjectLock
ProjectLock(MavenSession session, MojoDescriptor mojoDescriptor)
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
getProjectLock
private MojoExecutor.OwnerReentrantLock getProjectLock(MavenSession session)
-
-