You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2016/11/30 09:35:19 UTC

svn commit: r1772006 - /sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java

Author: kwin
Date: Wed Nov 30 09:35:19 2016
New Revision: 1772006

URL: http://svn.apache.org/viewvc?rev=1772006&view=rev
Log:
SLING-6343 always require a full synchronization on the specific module if for some reason the publishing failed

Modified:
    sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java

Modified: sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java?rev=1772006&r1=1772005&r2=1772006&view=diff
==============================================================================
--- sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java (original)
+++ sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java Wed Nov 30 09:35:19 2016
@@ -219,30 +219,36 @@ public class SlingLaunchpadBehaviour ext
             setModulePublishState(module, IServer.PUBLISH_STATE_NONE);
             return;
         }
-
-        if (ProjectHelper.isBundleProject(module[0].getProject())) {
-            String serverMode = getServer().getMode();
-            if (!serverMode.equals(ILaunchManager.DEBUG_MODE) || kind==IServer.PUBLISH_CLEAN) {
-                // in debug mode, we rely on the hotcode replacement feature of eclipse/jvm
-                // otherwise, for run and profile modes we explicitly publish the bundle module
-                
-                // TODO: make this configurable as part of the server config
-                
-                // SLING-3655 : when doing PUBLISH_CLEAN, the bundle deployment mechanism should 
-                // still be triggered
-                publishBundleModule(module, monitor);
-            }
-        } else if (ProjectHelper.isContentProject(module[0].getProject())) {
-
-            try {
-                publishContentModule(kind, deltaKind, module, monitor);
-            } catch (SerializationException e) {
-                throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Serialization error for "
-                        + traceOperation(kind, deltaKind, module).toString(), e));
-            } catch (IOException e) {
-                throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "IO error for "
-                        + traceOperation(kind, deltaKind, module).toString(), e));
+        
+        try {
+            if (ProjectHelper.isBundleProject(module[0].getProject())) {
+                String serverMode = getServer().getMode();
+                if (!serverMode.equals(ILaunchManager.DEBUG_MODE) || kind==IServer.PUBLISH_CLEAN) {
+                    // in debug mode, we rely on the hotcode replacement feature of eclipse/jvm
+                    // otherwise, for run and profile modes we explicitly publish the bundle module
+                    
+                    // TODO: make this configurable as part of the server config
+                    
+                    // SLING-3655 : when doing PUBLISH_CLEAN, the bundle deployment mechanism should 
+                    // still be triggered
+                    publishBundleModule(module, monitor);
+                }
+            } else if (ProjectHelper.isContentProject(module[0].getProject())) {
+    
+                try {
+                    publishContentModule(kind, deltaKind, module, monitor);
+                } catch (SerializationException e) {
+                    throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Serialization error for "
+                            + traceOperation(kind, deltaKind, module).toString(), e));
+                } catch (IOException e) {
+                    throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, "IO error for "
+                            + traceOperation(kind, deltaKind, module).toString(), e));
+                }
             }
+        } catch (CoreException e) {
+            // in case of errors always require full redeployment of the whole module
+            setModulePublishState(module, IServer.PUBLISH_STATE_FULL);
+            throw e;
         }
     }