System.out.println("INCLUDE:\n"+Utils.formatClassPath(classPath)+"\n");
}
private String[] getClassPath() throws ResolverException, IOException {
File testRepo;
Resolver r = new AetherResolver();
testRepo = Repository.getLocalRepository();
File srcParentPom = new File("src/test/resources/events-2.0.pom");
Assert.assertTrue(srcParentPom.exists());
File parentDir = new File(testRepo, "org/rioproject/examples/events/2.0");
if(!parentDir.exists()) {
if(parentDir.mkdirs())
System.out.println("Created "+parentDir.getAbsolutePath());
}
File parentPom = new File(parentDir, "events-2.0.pom");
if(!parentPom.exists()) {
FileUtils.copy(srcParentPom, parentPom);
}
Assert.assertTrue("The events-2.0.pom should be in "+parentPom.getAbsolutePath(), parentPom.exists());
File srcPom = new File("src/test/resources/events-api-2.0.pom");
Assert.assertTrue(srcPom.exists());
File srcJar = new File("src/test/resources/events-api-2.0.jar");
Assert.assertTrue(srcJar.exists());
File artifactDir = new File(testRepo, "org/rioproject/examples/events/events-api/2.0");
if(!artifactDir.exists()) {
if(artifactDir.mkdirs())
System.out.println("Created "+artifactDir.getAbsolutePath());
}
File pomArtifact = new File(artifactDir, "events-api-2.0.pom");
if(!pomArtifact.exists()) {
FileUtils.copy(srcPom, pomArtifact);
}
Assert.assertTrue("The events-api-2.0.pom should be in "+pomArtifact.getAbsolutePath(), pomArtifact.exists());
File jarArtifact = new File(artifactDir, "events-api-2.0.jar");
if(!jarArtifact.exists()) {
FileUtils.copy(srcJar, jarArtifact);
}
Assert.assertTrue("The events-api-2.0.jar should be in "+jarArtifact.getAbsolutePath(), jarArtifact.exists());
return r.getClassPathFor("org.rioproject.examples.events:events-api:2.0");
}