* under the License.
*/
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.model.ArchivaModelCloner;
import org.apache.maven.archiva.model.ArchivaProjectModel;
import org.apache.maven.archiva.model.ProjectRepository;
import org.apache.maven.archiva.model.Scm;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.Map.Entry;
-
/**
* ProjectModelMerge
*
return merged;
}
- private static Map createArtifactReferenceMap( List artifactReferences )
+ private static Map<String, ArtifactReference> createArtifactReferenceMap( List<ArtifactReference> artifactReferences )
{
- Map ret = new HashMap();
+ Map<String, ArtifactReference> ret = new HashMap<String, ArtifactReference>();
- Iterator it = artifactReferences.iterator();
- while ( it.hasNext() )
+ for ( ArtifactReference artifactReference : artifactReferences )
{
- ArtifactReference artifactReference = (ArtifactReference) it.next();
String key = toVersionlessArtifactKey( artifactReference );
ret.put( key, artifactReference );
}
return ret;
}
- private static Map createDependencyMap( List dependencies )
+ private static Map<String, Dependency> createDependencyMap( List<Dependency> dependencies )
{
- Map ret = new HashMap();
+ Map<String, Dependency> ret = new HashMap<String, Dependency>();
- Iterator it = dependencies.iterator();
+ Iterator<Dependency> it = dependencies.iterator();
while ( it.hasNext() )
{
- Dependency dep = (Dependency) it.next();
+ Dependency dep = it.next();
String key = toVersionlessDependencyKey( dep );
ret.put( key, dep );
}
return ret;
}
- private static Map createExclusionMap( List exclusions )
+ private static Map<String, Exclusion> createExclusionMap( List<Exclusion> exclusions )
{
- Map ret = new HashMap();
+ Map<String, Exclusion> ret = new HashMap<String, Exclusion>();
- Iterator it = exclusions.iterator();
+ Iterator<Exclusion> it = exclusions.iterator();
while ( it.hasNext() )
{
- Exclusion exclusion = (Exclusion) it.next();
+ Exclusion exclusion = it.next();
String key = exclusion.getGroupId() + ":" + exclusion.getArtifactId();
ret.put( key, exclusion );
}
return ret;
}
- private static Map createLicensesMap( List licenses )
+ private static Map<String, License> createLicensesMap( List<License> licenses )
{
- Map ret = new HashMap();
+ Map<String, License> ret = new HashMap<String, License>();
- Iterator it = licenses.iterator();
- while ( it.hasNext() )
+ for ( License license : licenses )
{
- License license = (License) it.next();
// TODO: Change to 'id' when LicenseTypeMapper is created.
String key = license.getName();
ret.put( key, license );
return ret;
}
- private static Map createRepositoriesMap( List repositories )
+ private static Map<String, ProjectRepository> createRepositoriesMap( List<ProjectRepository> repositories )
{
- Map ret = new HashMap();
+ Map<String, ProjectRepository> ret = new HashMap<String, ProjectRepository>();
- Iterator it = repositories.iterator();
- while ( it.hasNext() )
+ for ( ProjectRepository repo : repositories )
{
- ProjectRepository repo = (ProjectRepository) it.next();
// Should this really be using repo.id ?
String key = repo.getUrl();
ret.put( key, repo );
return merged;
}
+ @SuppressWarnings("unchecked")
private static Properties merge( Properties mainProperties, Properties parentProperties )
{
if ( parentProperties == null )
Properties merged = new Properties();
merged.putAll(mainProperties);
- Enumeration keys = parentProperties.propertyNames();
+ Enumeration<String> keys = (Enumeration<String>) parentProperties.propertyNames();
while ( keys.hasMoreElements() )
{
String key = (String) keys.nextElement();
return main;
}
- private static List mergeArtifactReferences( List mainArtifactReferences, List parentArtifactReferences )
+ private static List<ArtifactReference> mergeArtifactReferences( List<ArtifactReference> mainArtifactReferences, List<ArtifactReference> parentArtifactReferences )
{
if ( parentArtifactReferences == null )
{
if ( mainArtifactReferences == null )
{
- return ArchivaModelCloner.cloneLicenses( parentArtifactReferences );
+ return ArchivaModelCloner.cloneArtifactReferences( parentArtifactReferences );
}
- List merged = new ArrayList();
+ List<ArtifactReference> merged = new ArrayList<ArtifactReference>();
- Map mainArtifactReferenceMap = createArtifactReferenceMap( mainArtifactReferences );
- Map parentArtifactReferenceMap = createArtifactReferenceMap( parentArtifactReferences );
+ Map<String, ArtifactReference> mainArtifactReferenceMap = createArtifactReferenceMap( mainArtifactReferences );
+ Map<String, ArtifactReference> parentArtifactReferenceMap = createArtifactReferenceMap( parentArtifactReferences );
- Iterator it = mainArtifactReferenceMap.entrySet().iterator();
- while ( it.hasNext() )
+ for ( Map.Entry<String,ArtifactReference> entry : mainArtifactReferenceMap.entrySet() )
{
- Map.Entry entry = (Entry) it.next();
- String key = (String) entry.getKey();
+ String key = entry.getKey();
ArtifactReference mainArtifactReference = (ArtifactReference) entry.getValue();
- ArtifactReference parentArtifactReference = (ArtifactReference) parentArtifactReferenceMap.get( key );
+ ArtifactReference parentArtifactReference = parentArtifactReferenceMap.get( key );
if ( parentArtifactReference == null )
{
return merged;
}
- private static List mergeDependencies( List mainDependencies, List parentDependencies )
+ private static List<Dependency> mergeDependencies( List<Dependency> mainDependencies, List<Dependency> parentDependencies )
{
if ( parentDependencies == null )
{
if ( mainDependencies == null )
{
- List merged = ArchivaModelCloner.cloneDependencies( parentDependencies );
- Iterator it = merged.iterator();
+ List<Dependency> merged = ArchivaModelCloner.cloneDependencies( parentDependencies );
+ Iterator<Dependency> it = merged.iterator();
while ( it.hasNext() )
{
- Dependency dep = (Dependency) it.next();
+ Dependency dep = it.next();
dep.setFromParent( true );
}
return merged;
}
- List merged = new ArrayList();
+ List<Dependency> merged = new ArrayList<Dependency>();
- Map mainDepMap = createDependencyMap( mainDependencies );
- Map parentDepMap = createDependencyMap( parentDependencies );
- Set uniqueKeys = new HashSet();
+ Map<String, Dependency> mainDepMap = createDependencyMap( mainDependencies );
+ Map<String, Dependency> parentDepMap = createDependencyMap( parentDependencies );
+ Set<String> uniqueKeys = new HashSet<String>();
uniqueKeys.addAll( mainDepMap.keySet() );
uniqueKeys.addAll( parentDepMap.keySet() );
- Iterator it = uniqueKeys.iterator();
+ Iterator<String> it = uniqueKeys.iterator();
while ( it.hasNext() )
{
- String key = (String) it.next();
- Dependency parentDep = (Dependency) parentDepMap.get( key );
- Dependency mainDep = (Dependency) mainDepMap.get( key );
+ String key = it.next();
+ Dependency parentDep = parentDepMap.get( key );
+ Dependency mainDep = mainDepMap.get( key );
if ( parentDep == null )
{
return merged;
}
- private static List mergeDependencyManagement( List mainDepMgmt, List parentDepMgmt )
+ private static List<Dependency> mergeDependencyManagement( List<Dependency> mainDepMgmt, List<Dependency> parentDepMgmt )
{
if ( parentDepMgmt == null )
{
if ( mainDepMgmt == null )
{
- List merged = ArchivaModelCloner.cloneDependencies( parentDepMgmt );
- Iterator it = merged.iterator();
+ List<Dependency> merged = ArchivaModelCloner.cloneDependencies( parentDepMgmt );
+ Iterator<Dependency> it = merged.iterator();
while ( it.hasNext() )
{
- Dependency dep = (Dependency) it.next();
+ Dependency dep = it.next();
dep.setFromParent( true );
}
return merged;
}
- List merged = new ArrayList();
+ List<Dependency> merged = new ArrayList<Dependency>();
- Map mainDepMap = createDependencyMap( mainDepMgmt );
- Map parentDepMap = createDependencyMap( parentDepMgmt );
- Set uniqueKeys = new HashSet();
+ Map<String, Dependency> mainDepMap = createDependencyMap( mainDepMgmt );
+ Map<String, Dependency> parentDepMap = createDependencyMap( parentDepMgmt );
+ Set<String> uniqueKeys = new HashSet<String>();
uniqueKeys.addAll( mainDepMap.keySet() );
uniqueKeys.addAll( parentDepMap.keySet() );
- Iterator it = uniqueKeys.iterator();
+ Iterator<String> it = uniqueKeys.iterator();
while ( it.hasNext() )
{
- String key = (String) it.next();
- Dependency parentDep = (Dependency) parentDepMap.get( key );
- Dependency mainDep = (Dependency) mainDepMap.get( key );
+ String key = it.next();
+ Dependency parentDep = parentDepMap.get( key );
+ Dependency mainDep = mainDepMap.get( key );
if ( parentDep == null )
{
return merged;
}
- public static List mergeExclusions( List mainExclusions, List parentExclusions )
+ public static List<Exclusion> mergeExclusions( List<Exclusion> mainExclusions, List<Exclusion> parentExclusions )
{
if ( parentExclusions == null )
{
return ArchivaModelCloner.cloneExclusions( parentExclusions );
}
- List merged = new ArrayList();
+ List<Exclusion> merged = new ArrayList<Exclusion>();
- Map mainExclusionMap = createExclusionMap( mainExclusions );
- Map parentExclusionMap = createExclusionMap( parentExclusions );
+ Map<String, Exclusion> mainExclusionMap = createExclusionMap( mainExclusions );
+ Map<String, Exclusion> parentExclusionMap = createExclusionMap( parentExclusions );
- Iterator it = mainExclusionMap.entrySet().iterator();
- while ( it.hasNext() )
+ for ( Map.Entry<String, Exclusion> entry : mainExclusionMap.entrySet() )
{
- Map.Entry entry = (Entry) it.next();
- String key = (String) entry.getKey();
- Exclusion mainExclusion = (Exclusion) entry.getValue();
- Exclusion parentExclusion = (Exclusion) parentExclusionMap.get( key );
+ String key = entry.getKey();
+ Exclusion mainExclusion = entry.getValue();
+ Exclusion parentExclusion = parentExclusionMap.get( key );
if ( parentExclusion == null )
{
return merged;
}
- private static List mergeIndividuals( List mainIndividuals, List parentIndividuals )
+ private static List<Individual> mergeIndividuals( List<Individual> mainIndividuals, List<Individual> parentIndividuals )
{
if ( parentIndividuals == null )
{
return ArchivaModelCloner.cloneIndividuals( parentIndividuals );
}
- List merged = ArchivaModelCloner.cloneIndividuals( mainIndividuals );
+ List<Individual> merged = ArchivaModelCloner.cloneIndividuals( mainIndividuals );
- Iterator it = parentIndividuals.iterator();
+ Iterator<Individual> it = parentIndividuals.iterator();
while ( it.hasNext() )
{
- Individual parentIndividual = (Individual) it.next();
+ Individual parentIndividual = it.next();
if ( !mainIndividuals.contains( parentIndividual ) )
{
return merged;
}
- private static List mergeLicenses( List mainLicenses, List parentLicenses )
+ private static List<License> mergeLicenses( List<License> mainLicenses, List<License> parentLicenses )
{
if ( parentLicenses == null )
{
return ArchivaModelCloner.cloneLicenses( parentLicenses );
}
- List merged = new ArrayList();
+ List<License> merged = new ArrayList<License>();
- Map mainLicensesMap = createLicensesMap( mainLicenses );
- Map parentLicensesMap = createLicensesMap( parentLicenses );
+ Map<String, License> mainLicensesMap = createLicensesMap( mainLicenses );
+ Map<String, License> parentLicensesMap = createLicensesMap( parentLicenses );
- Iterator it = mainLicensesMap.entrySet().iterator();
- while ( it.hasNext() )
+ for ( Map.Entry<String, License> entry : mainLicensesMap.entrySet() )
{
- Map.Entry entry = (Entry) it.next();
- String key = (String) entry.getKey();
- License mainLicense = (License) entry.getValue();
- License parentLicense = (License) parentLicensesMap.get( key );
+ String key = entry.getKey();
+ License mainLicense = entry.getValue();
+ License parentLicense = parentLicensesMap.get( key );
if ( parentLicense == null )
{
return merged;
}
- private static List mergePlugins( List mainPlugins, List parentPlugins )
+ private static List<ArtifactReference> mergePlugins( List<ArtifactReference> mainPlugins, List<ArtifactReference> parentPlugins )
{
return mergeArtifactReferences( mainPlugins, parentPlugins );
}
- private static List mergeReports( List mainReports, List parentReports )
+ private static List<ArtifactReference> mergeReports( List<ArtifactReference> mainReports, List<ArtifactReference> parentReports )
{
return mergeArtifactReferences( mainReports, parentReports );
}
- private static List mergeRepositories( List mainRepositories, List parentRepositories )
+ private static List<ProjectRepository> mergeRepositories( List<ProjectRepository> mainRepositories, List<ProjectRepository> parentRepositories )
{
if ( parentRepositories == null )
{
if ( mainRepositories == null )
{
- return ArchivaModelCloner.cloneLicenses( parentRepositories );
+ return ArchivaModelCloner.cloneRepositories( parentRepositories );
}
- List merged = new ArrayList();
+ List<ProjectRepository> merged = new ArrayList<ProjectRepository>();
- Map mainRepositoriesMap = createRepositoriesMap( mainRepositories );
- Map parentRepositoriesMap = createRepositoriesMap( parentRepositories );
+ Map<String, ProjectRepository> mainRepositoriesMap = createRepositoriesMap( mainRepositories );
+ Map<String, ProjectRepository> parentRepositoriesMap = createRepositoriesMap( parentRepositories );
- Iterator it = mainRepositoriesMap.entrySet().iterator();
- while ( it.hasNext() )
+ for ( Map.Entry<String, ProjectRepository> entry : mainRepositoriesMap.entrySet() )
{
- Map.Entry entry = (Entry) it.next();
- String key = (String) entry.getKey();
- ProjectRepository mainProjectRepository = (ProjectRepository) entry.getValue();
- ProjectRepository parentProjectRepository = (ProjectRepository) parentRepositoriesMap.get( key );
+ String key = entry.getKey();
+ ProjectRepository mainProjectRepository = entry.getValue();
+ ProjectRepository parentProjectRepository = parentRepositoriesMap.get( key );
if ( parentProjectRepository == null )
{
*/
public class ProjectModelResolverStack
{
- private List resolvers;
+ private List<ProjectModelResolver> resolvers;
- private List listeners;
+ private List<ProjectModelResolutionListener> listeners;
public ProjectModelResolverStack()
{
- this.resolvers = new ArrayList();
- this.listeners = new ArrayList();
+ this.resolvers = new ArrayList<ProjectModelResolver>();
+ this.listeners = new ArrayList<ProjectModelResolutionListener>();
}
public void addListener( ProjectModelResolutionListener listener )
triggerResolutionStart( projectRef, this.resolvers );
- Iterator it = this.resolvers.iterator();
+ Iterator<ProjectModelResolver> it = this.resolvers.iterator();
while ( it.hasNext() )
{
- ProjectModelResolver resolver = (ProjectModelResolver) it.next();
+ ProjectModelResolver resolver = it.next();
try
{
private void triggerResolutionAttempting( VersionedReference projectRef, ProjectModelResolver resolver )
{
- Iterator it = this.listeners.iterator();
+ Iterator<ProjectModelResolutionListener> it = this.listeners.iterator();
while ( it.hasNext() )
{
- ProjectModelResolutionListener listener = (ProjectModelResolutionListener) it.next();
+ ProjectModelResolutionListener listener = it.next();
try
{
private void triggerResolutionError( VersionedReference projectRef, ProjectModelResolver resolver, Exception cause )
{
- Iterator it = this.listeners.iterator();
+ Iterator<ProjectModelResolutionListener> it = this.listeners.iterator();
while ( it.hasNext() )
{
- ProjectModelResolutionListener listener = (ProjectModelResolutionListener) it.next();
+ ProjectModelResolutionListener listener = it.next();
try
{
private void triggerResolutionMiss( VersionedReference projectRef, ProjectModelResolver resolver )
{
- Iterator it = this.listeners.iterator();
+ Iterator<ProjectModelResolutionListener> it = this.listeners.iterator();
while ( it.hasNext() )
{
- ProjectModelResolutionListener listener = (ProjectModelResolutionListener) it.next();
+ ProjectModelResolutionListener listener = it.next();
try
{
}
}
- private void triggerResolutionNotFound( VersionedReference projectRef, List resolvers )
+ private void triggerResolutionNotFound( VersionedReference projectRef, List<ProjectModelResolver> resolvers )
{
- Iterator it = this.listeners.iterator();
+ Iterator<ProjectModelResolutionListener> it = this.listeners.iterator();
while ( it.hasNext() )
{
- ProjectModelResolutionListener listener = (ProjectModelResolutionListener) it.next();
+ ProjectModelResolutionListener listener = it.next();
try
{
}
}
- private void triggerResolutionStart( VersionedReference projectRef, List resolvers )
+ private void triggerResolutionStart( VersionedReference projectRef, List<ProjectModelResolver> resolvers )
{
- Iterator it = this.listeners.iterator();
+ Iterator<ProjectModelResolutionListener> it = this.listeners.iterator();
while ( it.hasNext() )
{
- ProjectModelResolutionListener listener = (ProjectModelResolutionListener) it.next();
+ ProjectModelResolutionListener listener = it.next();
try
{
private void triggerResolutionSuccess( VersionedReference projectRef, ProjectModelResolver resolver,
ArchivaProjectModel model )
{
- Iterator it = this.listeners.iterator();
+ Iterator<ProjectModelResolutionListener> it = this.listeners.iterator();
while ( it.hasNext() )
{
- ProjectModelResolutionListener listener = (ProjectModelResolutionListener) it.next();
+ ProjectModelResolutionListener listener = it.next();
try
{
import org.apache.commons.io.FileUtils;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
+import org.apache.maven.archiva.consumers.InvalidRepositoryContentConsumer;
+import org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer;
import org.apache.maven.archiva.model.RepositoryContentStatistics;
import org.apache.maven.archiva.repository.AbstractRepositoryLayerTestCase;
return (RepositoryScanner) lookup( RepositoryScanner.class );
}
- private List getIgnoreList()
+ private List<String> getIgnoreList()
{
- List ignores = new ArrayList();
+ List<String> ignores = new ArrayList<String>();
ignores.addAll( Arrays.asList( RepositoryScanner.IGNORABLE_CONTENT ) );
return ignores;
}
{
ManagedRepositoryConfiguration repository = createSimpleRepository();
- List knownConsumers = new ArrayList();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
KnownScanConsumer consumer = new KnownScanConsumer();
consumer.setIncludes( ARTIFACT_PATTERNS );
knownConsumers.add( consumer );
- List invalidConsumers = new ArrayList();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );
{
ManagedRepositoryConfiguration repository = createSimpleRepository();
- List knownConsumers = new ArrayList();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
KnownScanConsumer consumer = new KnownScanConsumer();
consumer.setIncludes( ARTIFACT_PATTERNS );
knownConsumers.add( consumer );
- List invalidConsumers = new ArrayList();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );
{
ManagedRepositoryConfiguration repository = createSimpleRepository();
- List knownConsumers = new ArrayList();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
KnownScanConsumer consumer = new KnownScanConsumer();
consumer.setProcessUnmodified( true );
consumer.setIncludes( ARTIFACT_PATTERNS );
knownConsumers.add( consumer );
- List invalidConsumers = new ArrayList();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );
{
ManagedRepositoryConfiguration repository = createDefaultRepository();
- List knownConsumers = new ArrayList();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
KnownScanConsumer consumer = new KnownScanConsumer();
consumer.setIncludes( new String[]{"**/*.jar", "**/*.war", "**/*.pom", "**/maven-metadata.xml", "**/*-site.xml",
"**/*.zip", "**/*.tar.gz", "**/*.sha1", "**/*.md5"} );
knownConsumers.add( consumer );
- List invalidConsumers = new ArrayList();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );
public void testDefaultRepositoryArtifactScanner()
throws Exception
{
- List actualArtifactPaths = new ArrayList();
+ List<String> actualArtifactPaths = new ArrayList<String>();
actualArtifactPaths.add( "invalid/invalid/1.0-20050611.123456-1/invalid-1.0-20050611.123456-1.jar" );
actualArtifactPaths.add( "invalid/invalid/1.0-SNAPSHOT/invalid-1.0.jar" );
ManagedRepositoryConfiguration repository = createDefaultRepository();
- List knownConsumers = new ArrayList();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
KnownScanConsumer consumer = new KnownScanConsumer();
consumer.setIncludes( ARTIFACT_PATTERNS );
knownConsumers.add( consumer );
- List invalidConsumers = new ArrayList();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );
public void testDefaultRepositoryMetadataScanner()
throws Exception
{
- List actualMetadataPaths = new ArrayList();
+ List<String> actualMetadataPaths = new ArrayList<String>();
actualMetadataPaths.add( "org/apache/maven/some-ejb/1.0/maven-metadata.xml" );
actualMetadataPaths.add( "org/apache/maven/update/test-not-updated/maven-metadata.xml" );
ManagedRepositoryConfiguration repository = createDefaultRepository();
- List knownConsumers = new ArrayList();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
KnownScanConsumer knownConsumer = new KnownScanConsumer();
knownConsumer.setIncludes( new String[]{"**/maven-metadata*.xml"} );
knownConsumers.add( knownConsumer );
- List invalidConsumers = new ArrayList();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );
public void testDefaultRepositoryProjectScanner()
throws Exception
{
- List actualProjectPaths = new ArrayList();
+ List<String> actualProjectPaths = new ArrayList<String>();
actualProjectPaths.add( "org/apache/maven/A/1.0/A-1.0.pom" );
actualProjectPaths.add( "org/apache/maven/B/2.0/B-2.0.pom" );
ManagedRepositoryConfiguration repository = createDefaultRepository();
- List knownConsumers = new ArrayList();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
KnownScanConsumer consumer = new KnownScanConsumer();
consumer.setIncludes( new String[]{"**/*.pom"} );
knownConsumers.add( consumer );
- List invalidConsumers = new ArrayList();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );
public void testLegacyRepositoryArtifactScanner()
throws Exception
{
- List actualArtifactPaths = new ArrayList();
+ List<String> actualArtifactPaths = new ArrayList<String>();
actualArtifactPaths.add( "invalid/jars/1.0/invalid-1.0.jar" );
actualArtifactPaths.add( "invalid/jars/invalid-1.0.rar" );
ManagedRepositoryConfiguration repository = createLegacyRepository();
- List knownConsumers = new ArrayList();
+ List<KnownRepositoryContentConsumer> knownConsumers = new ArrayList<KnownRepositoryContentConsumer>();
KnownScanConsumer consumer = new KnownScanConsumer();
consumer.setIncludes( ARTIFACT_PATTERNS );
knownConsumers.add( consumer );
- List invalidConsumers = new ArrayList();
+ List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
InvalidScanConsumer badconsumer = new InvalidScanConsumer();
invalidConsumers.add( badconsumer );