final PublishEngine engine = new PublishEngine(settings, new EventManager());
final int[] counter = new int[] {0};
final DefaultModuleDescriptor md = DefaultModuleDescriptor
.newDefaultInstance(ModuleRevisionId.parse("#A;1.0"));
final FileSystemResolver resolver = new FileSystemResolver() {
public void publish(Artifact artifact, File src, boolean overwrite) throws IOException {
super.publish(artifact, src, overwrite);
synchronized (PublishEngineTest.this) {
counter[0]++;
}
sleepSilently(50);
synchronized (PublishEngineTest.this) {
counter[0]++;
}
}
};
resolver.setName("test");
resolver.setSettings(settings);
String publishRepoDir = new File("build/test/publish/repo").getAbsolutePath();
resolver.addIvyPattern(publishRepoDir + "/[module]/[revision]/[artifact].[ext]");
resolver.addArtifactPattern(publishRepoDir + "/[module]/[revision]/[artifact].[ext]");
FileUtil.copy(new File("test/repositories/1/org1/mod1.1/jars/mod1.1-1.0.jar"), new File(
"build/test/publish/module/A.jar"), null);
XmlModuleDescriptorWriter.write(md, new File("build/test/publish/module/ivy.xml"));