return requestedPath.endsWith( "/" + MetadataTools.MAVEN_METADATA );
}
+ /**
+ *
+ * @param requestedPath
+ * @return true if the requestedPath is likely an archetype catalog request.
+ */
+ public boolean isArchetypeCatalog( String requestedPath )
+ {
+ //TODO: Make it static final String
+ return requestedPath.endsWith( "/archetype-catalog.xml");
+ }
+
/**
* <p>
* Tests the path to see if it conforms to the expectations of a support file request.
return connectors.fetchMetatadaFromProxies( managedRepository, path ) != null;
}
+ // Is it an Archetype Catalog?
+ if ( repositoryRequest.isArchetypeCatalog( path ) )
+ {
+ File proxiedFile = connectors.fetchFromProxies( managedRepository, path );
+
+ return ( proxiedFile != null );
+ }
+
// Not any of the above? Then it's gotta be an artifact reference.
try
{
"target/test-classes/internal/org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ).getPath() );
repoContentFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( INTERNAL_REPO ),
internalRepo );
+ repoRequestControl.expectAndReturn(
+ repoRequest.isArchetypeCatalog( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ),
+ false );
archivaConfigurationControl.replay();
requestControl.replay();
internalRepo ),
new File( config.findManagedRepositoryById( INTERNAL_REPO ).getLocation(),
"target/test-classes/internal/org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ).getPath() );
+ repoRequestControl.expectAndReturn(
+ repoRequest.isArchetypeCatalog( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ),
+ false );
archivaConfigurationControl.replay();
requestControl.replay();
new File( config.findManagedRepositoryById( LOCAL_MIRROR_REPO ).getLocation(),
"target/test-classes/internal/org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ).getPath() );
+ repoRequestControl.expectAndReturn(
+ repoRequest.isArchetypeCatalog( "org/apache/archiva/archiva/1.2-SNAPSHOT/archiva-1.2-SNAPSHOT.jar" ),
+ false , 2);
+
archivaConfigurationControl.replay();
requestControl.replay();
repoContentFactoryControl.replay();