mirror of https://github.com/apache/maven.git
Fixed problem where repo count int MavenProject was increasing.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@763966 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3a049c8b5b
commit
e8e1d53e14
|
@ -240,8 +240,17 @@ public class MavenProject
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
setRemoteArtifactRepositories( (projectBuilderConfiguration.getRemoteRepositories() != null) ? projectBuilderConfiguration.getRemoteRepositories() : new ArrayList<ArtifactRepository>());
|
setRemoteArtifactRepositories( (projectBuilderConfiguration.getRemoteRepositories() != null) ? new ArrayList<ArtifactRepository>(projectBuilderConfiguration.getRemoteRepositories()) : new ArrayList<ArtifactRepository>());
|
||||||
for(Repository r: model.getPluginRepositories())
|
|
||||||
|
for(Repository r: model.getPluginRepositories())
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
remoteArtifactRepositories.add(repositorySystem.buildArtifactRepository( r ));
|
||||||
|
} catch (InvalidRepositoryException e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(Repository r: model.getPluginRepositories())
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
remoteArtifactRepositories.add(repositorySystem.buildArtifactRepository( r ));
|
remoteArtifactRepositories.add(repositorySystem.buildArtifactRepository( r ));
|
||||||
|
@ -384,7 +393,7 @@ public class MavenProject
|
||||||
|
|
||||||
public List<ArtifactRepository> getRemoteArtifactRepositories()
|
public List<ArtifactRepository> getRemoteArtifactRepositories()
|
||||||
{
|
{
|
||||||
return remoteArtifactRepositories;
|
return new ArrayList<ArtifactRepository>( remoteArtifactRepositories );
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasParent()
|
public boolean hasParent()
|
||||||
|
|
Loading…
Reference in New Issue