diff options
author | Olivier Lamy <olamy@apache.org> | 2012-05-28 22:52:23 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-05-28 22:52:23 +0000 |
commit | 823b816f5283e5490b38daa3a8387a72df74e6e6 (patch) | |
tree | 8a4b28ba1d6b918ede416ce596c3ce1ed3832fab /archiva-modules/plugins | |
parent | b19947a75a0b3b9cf0530ccb6a19d42c13d3f349 (diff) | |
download | archiva-823b816f5283e5490b38daa3a8387a72df74e6e6.tar.gz archiva-823b816f5283e5490b38daa3a8387a72df74e6e6.zip |
take care of metadata files with id as maven-metadata-archiva-vm-all-public.xml
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1343415 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/plugins')
-rw-r--r-- | archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java index 61102dea4..cf27e99c8 100644 --- a/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java +++ b/archiva-modules/plugins/maven2-repository/src/main/java/org/apache/archiva/metadata/repository/storage/maven2/Maven2RepositoryStorage.java @@ -46,6 +46,7 @@ import org.apache.archiva.model.SnapshotVersion; 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; @@ -126,7 +127,9 @@ public class Maven2RepositoryStorage 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 @@ -746,7 +749,14 @@ public class Maven2RepositoryStorage { 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; + } } |