diff options
author | Jevica Arianne B. Zurbano <jzurbano@apache.org> | 2009-08-18 11:41:29 +0000 |
---|---|---|
committer | Jevica Arianne B. Zurbano <jzurbano@apache.org> | 2009-08-18 11:41:29 +0000 |
commit | f4cc3f720830fe16a3e67500fb769604e324f12e (patch) | |
tree | cd1e2dd0e680b6310fdd85a5ee6b8a3e150fd331 | |
parent | 4be29249796630e68b3ffc79fbc86a8476fb2ebd (diff) | |
download | archiva-f4cc3f720830fe16a3e67500fb769604e324f12e.tar.gz archiva-f4cc3f720830fe16a3e67500fb769604e324f12e.zip |
[MRM-1151] - Error when processing file nexus-maven-repository-index.zip
applied patch and added unit test.
Submitted by: Gwen Harold Autencio
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@805371 13f79535-47bb-0310-9956-ffa450edef68
2 files changed, 16 insertions, 1 deletions
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/FileTypes.java b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/FileTypes.java index 94dc9904a..bf043a74f 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/FileTypes.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/FileTypes.java @@ -78,7 +78,8 @@ public class FileTypes */ public static final List<String> DEFAULT_EXCLUSIONS = Arrays.asList( "**/maven-metadata.xml", "**/maven-metadata-*.xml", "**/*.sha1", - "**/*.asc", "**/*.md5", "**/*.pgp" ); + "**/*.asc", "**/*.md5", "**/*.pgp", + "**/.index/*.*"); public void setArchivaConfiguration( ArchivaConfiguration archivaConfiguration ) { diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/FileTypesTest.java b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/FileTypesTest.java index 6c5df3bf8..613c86c24 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/FileTypesTest.java +++ b/archiva-modules/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/FileTypesTest.java @@ -52,4 +52,18 @@ public class FileTypesTest assertFalse( filetypes.matchesArtifactPattern( "org/apache/derby/derby/10.2.2.0/maven-metadata.xml" ) ); assertFalse( filetypes.matchesArtifactPattern( "org/apache/derby/derby/maven-metadata.xml" ) ); } + + public void testDefaultExclusions() + { + assertTrue( filetypes.matchesDefaultExclusions( "repository/test/.index/nexus-maven-repository-index.gz" ) ); + assertTrue( filetypes.matchesDefaultExclusions( "repository/test/.index/nexus-maven-repository-index.zip" ) ); + assertTrue( filetypes.matchesDefaultExclusions( "repository/test/org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.sha1" ) ); + assertTrue( filetypes.matchesDefaultExclusions( "repository/test/org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz.md5" ) ); + assertTrue( filetypes.matchesDefaultExclusions( "repository/test/org/apache/derby/derby/10.2.2.0/maven-metadata.xml" ) ); + assertTrue( filetypes.matchesDefaultExclusions( "repository/test/org/apache/derby/derby/10.2.2.0/maven-metadata.xml.sha1" ) ); + assertTrue( filetypes.matchesDefaultExclusions( "repository/test/org/apache/derby/derby/10.2.2.0/maven-metadata.xml.md5" ) ); + + assertFalse( filetypes.matchesDefaultExclusions( "repository/test/org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.zip" ) ); + assertFalse( filetypes.matchesDefaultExclusions( "repository/test/org/apache/derby/derby/10.2.2.0/derby-10.2.2.0-bin.tar.gz" ) ); + } } |