With IvyDE 2.0 I am using the "Do retrieve after resolve" to copy the
artifacts into the WEB-INF/lib folder so that they get published to
Tomcat. Because IvyDE does not refresh the workspace after a resolve
(JIRA issue 27) Eclipse does not know that the files have been copied
into the WEB-INF\lib folder. I have fixed the issue in my build, but
since I am not a plugin-developer I am not sure if this is the best way
to fix the issue. The following is the code I added to the public void
progess(IvyEvent event) method in IvyResolveJob to handle updating
Eclipse after the retrieve:
} else if (event instanceof EndResolveDependencyEvent) {
monitor.subTask(" ");
}
// begin new code
else if (event instanceof EndRetrieveEvent) {
EndRetrieveEvent evt = (EndRetrieveEvent)event;
if (evt.getNbCopied() > 0){
try {
conf.javaProject.getProject().refreshLocal(IResource.DEPTH_INFINITE,
monitor);
} catch (CoreException e) {
IvyPlugin.log(IStatus.ERROR, "failed to refresh
project on retrieve: ", e);
}
}
}
// end new code