@@ -278,19 +278,20 @@ public class ArchivaIndexingTaskExecutorTest | |||
Path packedIndexDirectory = icf.getLocalPackedIndexPath(); | |||
Path indexerDirectory = icf.getLocalIndexPath(); | |||
Files.list(packedIndexDirectory).filter( path -> path.getFileName().toString().startsWith("nexus-maven-repository-index") ) | |||
.forEach( path -> | |||
{ | |||
try | |||
{ | |||
System.err.println("Deleting "+path); | |||
Files.delete( path ); | |||
} | |||
catch ( IOException e ) | |||
{ | |||
e.printStackTrace( ); | |||
} | |||
} ); | |||
for (Path dir : new Path[] { packedIndexDirectory, indexerDirectory }) { | |||
Files.list(dir).filter(path -> path.getFileName().toString().startsWith("nexus-maven-repository-index")) | |||
.forEach(path -> | |||
{ | |||
try { | |||
System.err.println("Deleting " + path); | |||
Files.delete(path); | |||
} catch (IOException e) { | |||
e.printStackTrace(); | |||
} | |||
}); | |||
} | |||
Path artifactFile = basePath.resolve( |
@@ -95,9 +95,13 @@ public class Maven2RepositoryMergerTest | |||
Path pom = Paths.get( targetRepoPath, | |||
"com/example/test/test-artifact/1.0-SNAPSHOT/test-artifact-1.0-20100308.230825-1.pom" ); | |||
assertFalse( Files.exists(mergedArtifact) ); | |||
assertFalse( Files.exists(mavenMetadata) ); | |||
assertFalse( Files.exists(pom) ); | |||
for (Path testArtifact : new Path[] { mergedArtifact, mavenMetadata, pom }) { | |||
Files.deleteIfExists(testArtifact); | |||
} | |||
assertFalse( "Artifact file exists already", Files.exists(mergedArtifact) ); | |||
assertFalse( "Metadata file exists already", Files.exists(mavenMetadata) ); | |||
assertFalse( "Pom File exists already", Files.exists(pom) ); | |||
Configuration c = new Configuration(); | |||
ManagedRepositoryConfiguration testRepo = new ManagedRepositoryConfiguration(); | |||
testRepo.setId( TEST_REPO_ID ); |