incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From romb...@apache.org
Subject svn commit: r1592478 - /sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java
Date Mon, 05 May 2014 10:49:58 GMT
Author: rombert
Date: Mon May  5 10:49:58 2014
New Revision: 1592478

URL: http://svn.apache.org/r1592478
Log:
SLING-3159 - Never try to install bundles if the support bundle is not
installed

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=1592478&r1=1592477&r2=1592478&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
Mon May  5 10:49:58 2014
@@ -258,6 +258,14 @@ public class SlingLaunchpadBehaviour ext
             OsgiClient osgiClient = Activator.getDefault().getOsgiClientFactory()
                     .createOsgiClient(ServerUtil.getRepositoryInfo(getServer(), monitor));
 
+            Version supportBundleVersion = osgiClient
+                    .getBundleVersion(EmbeddedArtifactLocator.SUPPORT_BUNDLE_SYMBOLIC_NAME);
+            monitor.worked(1);
+            if (supportBundleVersion == null) {
+                throw new CoreException(new Status(Status.ERROR, Activator.PLUGIN_ID,
+                        "The support bundle was not found, please install it via the server
properties page"));
+            }
+
             IJavaProject javaProject = ProjectHelper.asJavaProject(project);
 
             IFolder outputFolder = (IFolder) project.getWorkspace().getRoot().findMember(javaProject.getOutputLocation());
@@ -266,7 +274,7 @@ public class SlingLaunchpadBehaviour ext
 
             if ( installLocally ) {
                 osgiClient.installLocalBundle(outputLocation.toOSString());
-                monitor.worked(4);
+                monitor.worked(3);
             } else {
 
                 JarBuilder builder = new JarBuilder();
@@ -274,7 +282,7 @@ public class SlingLaunchpadBehaviour ext
                 monitor.worked(1);
                 
                 osgiClient.installLocalBundle(bundle, outputFolder.getLocation().toOSString());
-                monitor.worked(3);
+                monitor.worked(2);
             }
 
             setModulePublishState(module, IServer.PUBLISH_STATE_NONE);



Mime
View raw message