*/
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 )
{
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" ) );
+ }
}