use of org.apache.ivy.core.event.publish.EndArtifactPublishEvent in project ant-ivy by apache.
the class PublishEngine method publish.
private void publish(Artifact artifact, File src, DependencyResolver resolver, boolean overwrite) throws IOException {
IvyContext.getContext().checkInterrupted();
// notify triggers that an artifact is about to be published
eventManager.fireIvyEvent(new StartArtifactPublishEvent(resolver, artifact, src, overwrite));
// set to true once the publish succeeds
boolean successful = false;
try {
if (src.exists()) {
resolver.publish(artifact, src, overwrite);
successful = true;
}
} finally {
// notify triggers that the publish is finished, successfully or not.
eventManager.fireIvyEvent(new EndArtifactPublishEvent(resolver, artifact, src, overwrite, successful));
}
}
Aggregations