Author: rob.stryker(a)jboss.com
Date: 2007-10-18 18:16:56 -0400 (Thu, 18 Oct 2007)
New Revision: 4352
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
Log:
JBIDE-1117
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-10-18
18:55:36 UTC (rev 4351)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-10-18
22:16:56 UTC (rev 4352)
@@ -82,9 +82,20 @@
this.delta = delta;
}
+ protected String getModulePath(IModule[] module ) {
+ String modulePath = "";
+ for( int i = 0; i < module.length; i++ ) {
+ modulePath += module[i].getName() + Path.SEPARATOR;
+ }
+ modulePath = modulePath.substring(0, modulePath.length()-1);
+ return modulePath;
+ }
+
public IStatus publishModule(int kind, int deltaKind,
int modulePublishState, IModule[] module, IProgressMonitor monitor)
throws CoreException {
+ String modulePath = getModulePath(module);
+
IStatus status = null;
boolean deleted = false;
for( int i = 0; i < module.length; i++ ) {
@@ -96,11 +107,11 @@
status = unpublish(server, module, monitor);
} else if (kind == IServer.PUBLISH_FULL || kind == IServer.PUBLISH_CLEAN) {
if( deleted )
- throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
"The module cannot be published because it cannot be located"));
+ throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
"The module cannot be published because it cannot be located. (" + modulePath +
")"));
status = fullPublish(module, module[module.length-1], monitor);
} else if (kind == IServer.PUBLISH_INCREMENTAL || kind == IServer.PUBLISH_AUTO) {
if( deleted )
- throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
"The module cannot be published because it cannot be located"));
+ throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
"The module cannot be published because it cannot be located. (" + modulePath +
")"));
status = incrementalPublish(module, module[module.length-1], monitor);
}
return status;
@@ -157,7 +168,7 @@
boolean error = localSafeDelete(getDeployPath(module), eventRoot);
if( error ) {
publishState = IServer.PUBLISH_STATE_FULL;
- throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
"Unable to delete module from server.", new Exception("Some files were not
removed from the server")));
+ throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
"Unable to delete module from server. (" + getModulePath(module) +
")", new Exception("Some files were not removed from the server")));
}
return null;
}
Show replies by date