[132661] Error during clean build
diff --git a/plugins/org.eclipse.jst.server.core/.options b/plugins/org.eclipse.jst.server.core/.options
index 7da2b54..c0ef0b3 100644
--- a/plugins/org.eclipse.jst.server.core/.options
+++ b/plugins/org.eclipse.jst.server.core/.options
@@ -2,3 +2,6 @@
# Turn on general debugging
org.eclipse.jst.server.core/debug=true
+
+# Turn on general debugging
+org.eclipse.jst.server.core/publishing=false
\ No newline at end of file
diff --git a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/PublishUtil.java b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/PublishUtil.java
index e45ed0a..88edd3e 100644
--- a/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/PublishUtil.java
+++ b/plugins/org.eclipse.jst.server.core/sjavacore/org/eclipse/jst/server/core/PublishUtil.java
@@ -439,15 +439,6 @@
status.toArray(stat);
return stat;
}
- } else if (kind2 == IModuleResourceDelta.REMOVED) {
- IPath path2 = path.append(resource.getModuleRelativePath()).append(resource.getName());
- File file = path2.toFile();
- if (file.exists() && !file.delete()) {
- status.add(new Status(IStatus.ERROR, JavaServerPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorDelete, path2), null));
- IStatus[] stat = new IStatus[status.size()];
- status.toArray(stat);
- return stat;
- }
}
IModuleResourceDelta[] childDeltas = delta.getAffectedChildren();
@@ -456,6 +447,15 @@
IStatus[] stat = publishDelta(childDeltas[i], path, monitor);
addArrayToList(status, stat);
}
+
+ if (kind2 == IModuleResourceDelta.REMOVED) {
+ IPath path2 = path.append(resource.getModuleRelativePath()).append(resource.getName());
+ File file = path2.toFile();
+ if (file.exists() && !file.delete()) {
+ status.add(new Status(IStatus.ERROR, JavaServerPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorDelete, path2), null));
+ }
+ }
+
IStatus[] stat = new IStatus[status.size()];
status.toArray(stat);
return stat;
@@ -464,7 +464,7 @@
private static void deleteFile2(IPath path, IModuleFile file) throws CoreException {
Trace.trace(Trace.PUBLISHING, "Deleting: " + file.getName() + " from " + path.toString());
IPath path2 = path.append(file.getModuleRelativePath()).append(file.getName());
- if (path2.toFile().delete())
+ if (path2.toFile().exists() && !path2.toFile().delete())
throw new CoreException(new Status(IStatus.ERROR, JavaServerPlugin.PLUGIN_ID, 0, NLS.bind(Messages.errorDeleting, path2), null));
}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatLaunchConfigurationDelegate.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatLaunchConfigurationDelegate.java
index 1d09365..140ebc1 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatLaunchConfigurationDelegate.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatLaunchConfigurationDelegate.java
@@ -40,7 +40,6 @@
}
TomcatServerBehaviour tomcatServer = (TomcatServerBehaviour) server.loadAdapter(TomcatServerBehaviour.class, null);
- tomcatServer.setupLaunch(launch, mode, monitor);
String mainTypeName = tomcatServer.getRuntimeClass();
@@ -94,6 +93,7 @@
setDefaultSourceLocator(launch, configuration);
// Launch the configuration
+ tomcatServer.setupLaunch(launch, mode, monitor);
try {
runner.run(runConfig, launch, monitor);
tomcatServer.setProcess(launch.getProcesses()[0]);
diff --git a/plugins/org.eclipse.wst.server.core/.options b/plugins/org.eclipse.wst.server.core/.options
index 6b73658..3812a2f 100644
--- a/plugins/org.eclipse.wst.server.core/.options
+++ b/plugins/org.eclipse.wst.server.core/.options
@@ -3,5 +3,14 @@
# Turn on general debugging
org.eclipse.wst.server.core/debug=true
-# Prints out values
+# Tracking of server resources
org.eclipse.wst.server.core/resources=false
+
+# Loading of extension points
+org.eclipse.wst.server.core/extension_point=false
+
+# Server listeners
+org.eclipse.wst.server.core/listeners=false
+
+# Performance of loading and calling delegates
+org.eclipse.wst.server.core/performance=false
diff --git a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ResourceManager.java b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ResourceManager.java
index d6071a7..f5a530f 100644
--- a/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ResourceManager.java
+++ b/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/ResourceManager.java
@@ -79,14 +79,18 @@
/**
* Listen for projects being added or removed and act accordingly.
- *
+ *
* @param event org.eclipse.core.resources.IResourceChangeEvent
*/
public void resourceChanged(IResourceChangeEvent event) {
IResourceDelta delta = event.getDelta();
if (delta == null)
return;
-
+
+ // ignore clean builds
+ if (event.getBuildKind() == IncrementalProjectBuilder.CLEAN_BUILD)
+ return;
+
Trace.trace(Trace.RESOURCES, "->- ServerResourceChangeListener responding to resource change: " + event.getType() + " ->-");
IResourceDelta[] children = delta.getAffectedChildren();
if (children != null) {
@@ -189,13 +193,7 @@
// keep track of future changes to the file system
resourceChangeListener = new ServerResourceChangeListener();
- ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE);
-
- /*configurationListener = new IServerConfigurationListener() {
- public void childProjectChange(IServerConfiguration configuration) {
- handleConfigurationChildProjectsChange(configuration);
- }
- };*/
+ ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_BUILD | IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE);
Trace.trace(Trace.FINER, "Loading workspace servers and server configurations");
IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
diff --git a/plugins/org.eclipse.wst.server.ui/.options b/plugins/org.eclipse.wst.server.ui/.options
index b6047e1..295c5ce 100644
--- a/plugins/org.eclipse.wst.server.ui/.options
+++ b/plugins/org.eclipse.wst.server.ui/.options
@@ -3,5 +3,8 @@
# Turn on general debugging
org.eclipse.wst.server.ui/debug=true
-# Prints out values
-org.eclipse.wst.server.ui/editor=false
+# Loading of extension points
+org.eclipse.wst.server.ui/extension_point=false
+
+# Performance of loading and calling delegates
+org.eclipse.wst.server.ui/performance=false
\ No newline at end of file