repositoryStorage.listRootNamespaces( repoId, new ExcludesFilter<String>( namespaces ) );
if ( storageNamespaces != null && !storageNamespaces.isEmpty() )
{
- if ( log.isDebugEnabled() )
- {
- log.debug( "Resolved root namespaces from storage: " + storageNamespaces );
- }
+
+ log.debug( "Resolved root namespaces from storage: {}", storageNamespaces );
+
for ( String n : storageNamespaces )
{
try
{
log.debug( "Resolved namespaces from storage: {}", storageNamespaces );
+
for ( String n : storageNamespaces )
{
try
repositoryStorage.readArtifactsMetadata( repoId, namespace, projectId, projectVersion, filter );
if ( storageArtifacts != null && !storageArtifacts.isEmpty() )
{
- if ( log.isDebugEnabled() )
- {
- log.debug( "Resolved artifacts from storage: " + storageArtifacts );
- }
+
+ log.debug( "Resolved artifacts from storage: {}", storageArtifacts );
+
for ( ArtifactMetadata artifact : storageArtifacts )
{
try
import org.apache.archiva.proxy.common.WagonFactory;
import org.apache.archiva.reports.RepositoryProblemFacet;
import org.apache.archiva.xml.XMLException;
+import org.apache.commons.lang.StringUtils;
import org.apache.maven.model.CiManagement;
import org.apache.maven.model.Dependency;
import org.apache.maven.model.IssueManagement;
private final static Logger log = LoggerFactory.getLogger( Maven2RepositoryStorage.class );
- private static final String METADATA_FILENAME = "maven-metadata.xml";
+ private static final String METADATA_FILENAME_START = "maven-metadata";
+
+ private static final String METADATA_FILENAME = METADATA_FILENAME_START + ".xml";
@PostConstruct
{
return false;
}
+ // some files from remote repositories can have name like maven-metadata-archiva-vm-all-public.xml
+ else if ( StringUtils.startsWith( name, METADATA_FILENAME_START ) && StringUtils.endsWith( name, ".xml" ) )
+ {
+ return false;
+ }
+
return true;
+
}
}