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:
Britton Isbell 2009-04-10 16:05:31 +00:00
parent 3a049c8b5b
commit e8e1d53e14
1 changed files with 12 additions and 3 deletions

View File

@ -240,7 +240,16 @@ 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())
{
try {
remoteArtifactRepositories.add(repositorySystem.buildArtifactRepository( r ));
} catch (InvalidRepositoryException e) {
}
}
for(Repository r: model.getPluginRepositories()) for(Repository r: model.getPluginRepositories())
{ {
try { try {
@ -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()