Class MojoExecutor.ProjectLock
- java.lang.Object
-
- org.apache.maven.lifecycle.internal.MojoExecutor.ProjectLock
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Enclosing class:
- MojoExecutor
private static 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) java.util.concurrent.locks.Lock
acquiredProjectLock
-
Constructor Summary
Constructors Constructor Description ProjectLock(MavenSession session, MojoDescriptor mojoDescriptor, java.util.concurrent.locks.ReadWriteLock aggregatorLock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
private java.util.concurrent.locks.Lock
getProjectLock(MavenSession session)
-
-
-
Constructor Detail
-
ProjectLock
ProjectLock(MavenSession session, MojoDescriptor mojoDescriptor, java.util.concurrent.locks.ReadWriteLock aggregatorLock)
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
getProjectLock
private java.util.concurrent.locks.Lock getProjectLock(MavenSession session)
-
-