mirror of https://github.com/apache/maven.git
o starting to add generics
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@726614 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
17e8ace705
commit
8d90d7cabc
|
@ -78,15 +78,13 @@ public class DefaultMavenTools
|
||||||
// but just trying to collect it all in one place right now.
|
// but just trying to collect it all in one place right now.
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
public List buildArtifactRepositories( List repositories )
|
public List<ArtifactRepository> buildArtifactRepositories( List<Repository> repositories )
|
||||||
throws InvalidRepositoryException
|
throws InvalidRepositoryException
|
||||||
{
|
{
|
||||||
List repos = new ArrayList();
|
List<ArtifactRepository> repos = new ArrayList<ArtifactRepository>();
|
||||||
|
|
||||||
for ( Iterator i = repositories.iterator(); i.hasNext(); )
|
for( Repository mavenRepo : repositories )
|
||||||
{
|
{
|
||||||
Repository mavenRepo = (Repository) i.next();
|
|
||||||
|
|
||||||
ArtifactRepository artifactRepo = buildArtifactRepository( mavenRepo );
|
ArtifactRepository artifactRepo = buildArtifactRepository( mavenRepo );
|
||||||
|
|
||||||
if ( !repos.contains( artifactRepo ) )
|
if ( !repos.contains( artifactRepo ) )
|
||||||
|
@ -94,6 +92,7 @@ public class DefaultMavenTools
|
||||||
repos.add( artifactRepo );
|
repos.add( artifactRepo );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return repos;
|
return repos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,8 +104,7 @@ public class DefaultMavenTools
|
||||||
String id = repo.getId();
|
String id = repo.getId();
|
||||||
String url = repo.getUrl();
|
String url = repo.getUrl();
|
||||||
|
|
||||||
return artifactRepositoryFactory.createDeploymentArtifactRepository( id, url, repo.getLayout(),
|
return artifactRepositoryFactory.createDeploymentArtifactRepository( id, url, repo.getLayout(), repo.isUniqueVersion() );
|
||||||
repo.isUniqueVersion() );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -207,8 +205,7 @@ public class DefaultMavenTools
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArtifactRepository createRepository( String url,
|
public ArtifactRepository createRepository( String url, String repositoryId )
|
||||||
String repositoryId )
|
|
||||||
{
|
{
|
||||||
// snapshots vs releases
|
// snapshots vs releases
|
||||||
// offline = to turning the update policy off
|
// offline = to turning the update policy off
|
||||||
|
@ -291,7 +288,7 @@ public class DefaultMavenTools
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List buildArtifactRepositories( Model model )
|
public List<ArtifactRepository> buildArtifactRepositories( Model model )
|
||||||
throws ProjectBuildingException
|
throws ProjectBuildingException
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
|
|
@ -41,7 +41,7 @@ public interface MavenTools
|
||||||
// Methods taken from ProjectUtils
|
// Methods taken from ProjectUtils
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
List buildArtifactRepositories( List repositories )
|
List<ArtifactRepository> buildArtifactRepositories( List<Repository> repositories )
|
||||||
throws InvalidRepositoryException;
|
throws InvalidRepositoryException;
|
||||||
|
|
||||||
ArtifactRepository buildDeploymentArtifactRepository( DeploymentRepository repo )
|
ArtifactRepository buildDeploymentArtifactRepository( DeploymentRepository repo )
|
||||||
|
|
Loading…
Reference in New Issue