*/
private void copyCactusWebappResources(File theDir) throws CoreException
{
Project antProject = new Project();
antProject.init();
Copy copy = new Copy();
copy.setProject(antProject);
copy.setTodir(theDir);
CactusPlugin thePlugin = CactusPlugin.getDefault();
URL jspRedirectorURL = null;
try {
jspRedirectorURL = Platform.asLocalURL(thePlugin.getBundle().getEntry(JSPREDIRECTOR_PATH));
} catch (IOException e1) {
//do nothing the exception is called later.
}
if (jspRedirectorURL == null)
{
throw CactusPlugin.createCoreException(
"CactusLaunch.message.prepare.error.plugin.file",
" : " + JSPREDIRECTOR_PATH,
null);
}
try{
jspRedirectorURL = Platform.asLocalURL(jspRedirectorURL);
} catch(IOException e) {
throw CactusPlugin.createCoreException(
"CactusLaunch.message.prepare.error.plugin.file",
" : " + e.getMessage(),
null);
}
//CactusPlugin.log(jspRedirectorURL.getPath());
File jspRedirector = new File(jspRedirectorURL.getPath());
FileSet fileSet = new FileSet();
fileSet.setFile(jspRedirector);
copy.addFileset(fileSet);
copy.execute();
}