An excellent operation is CAS (Compare and Swap/Set). This would mean that
POJO would have getters which return "unmodifiableCollection", and new CAS
operations, for instance for the project dependencies.
The new method would be then:
public boolean casDependencies(Collection<Artifact> original,
Collection<Artifact> modified).
The usecase would be then in whatever plugin:
Collection<Artifact> newDeps;
do {
Collection<Artifact> deps = project.getDependencies();
newDeps = copyAndModifyDependencies( deps );
} while ( !project.casDependencies( deps, newDeps ) );
Every injectable POJO object will share single guardian lock object per POM
project (plugin has no notion) and use it in CAS operations (maven-core
impl).
--
View this message in context:
http://maven.40175.n5.nabble.com/Maven-Commit-3b671d07340b002e13775883d09e7f7e0d9a3c49-tp5821660p5821741.html
Sent from the Maven Developers mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]