mirror of https://github.com/apache/maven.git
o Added method to clone/fork model resolver which is a prerequisite for importing other POMs/mixins during the model building where the model builder basically recurses and we want the resolution processes for these sub POMs to be isolated
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@795227 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ef13f229e8
commit
70ae109093
|
@ -82,6 +82,12 @@ class RepositoryModelResolver
|
|||
this.remoteRepositories = new ArrayList<ArtifactRepository>( remoteRepositories );
|
||||
}
|
||||
|
||||
public ModelResolver newCopy()
|
||||
{
|
||||
return new RepositoryModelResolver( repositorySystem, resolutionErrorHandler, localRepository,
|
||||
remoteRepositories );
|
||||
}
|
||||
|
||||
public void addRepository( Repository repository )
|
||||
throws InvalidRepositoryException
|
||||
{
|
||||
|
|
|
@ -55,4 +55,13 @@ public interface ModelResolver
|
|||
void addRepository( Repository repository )
|
||||
throws InvalidRepositoryException;
|
||||
|
||||
/**
|
||||
* Clones this resolver for usage in a forked resolution process. In general, implementors need not provide a deep
|
||||
* clone. The only requirement is that invocations of {@link #addRepository(Repository)} on the clone do not affect
|
||||
* the state of the original resolver and vice versa.
|
||||
*
|
||||
* @return The cloned resolver, never {@code null}.
|
||||
*/
|
||||
ModelResolver newCopy();
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue