Permalink
Browse files

[378493] Basic J2ee Preview server broken on Juno

  • Loading branch information...
1 parent 4d87c0e commit d5811a082f891a00417ca3a9eb6e73435777f68e eyuen committed May 17, 2012
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jst.server_adapters.feature"
label="%featureName"
- version="3.2.100.qualifier"
+ version="3.2.200.qualifier"
provider-name="%providerName"
license-feature="org.eclipse.license"
license-feature-version="1.0.0.qualifier">
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jst.server.preview.adapter;singleton:=true
-Bundle-Version: 1.1.100.qualifier
+Bundle-Version: 1.1.200.qualifier
Bundle-Activator: org.eclipse.jst.server.preview.adapter.internal.PreviewPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -13,7 +13,7 @@
versions="1.0"/>
<moduleType
types="jst.web"
- versions="2.2,2.3,2.4,2.5"/>
+ versions="2.2,2.3,2.4,2.5,3.0"/>
<moduleType
types="jst.utility"
versions="1.0"/>
@@ -69,7 +69,7 @@
version="1.0"/>
<facet
id="jst.web"
- version="2.2,2.3,2.4,2.5"/>
+ version="2.2,2.3,2.4,2.5,3.0"/>
<facet
id="jst.utility"
version="1.0"/>
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -35,18 +35,34 @@
*
*/
public class PreviewLaunchConfigurationDelegate extends AbstractJavaLaunchConfigurationDelegate {
+ // To support running from the workbench, be careful when adding and removing
+ // bundles to this array. For instance, org.eclipse.wst.server.preview is a
+ // plug-in that can be checked out in the workbench. If it is, the classpath
+ // needs to point to the bin directory of this plug-in. This plug-in is tracked
+ // in the array with CLASSPATH_BIN_INDEX_PREVIEW_SERVER. Therefore, when updating
+ // this array, please ensure the index of org.eclipse.wst.server.preview
+ // corresponds to CLASSPATH_BIN_INDEX_PREVIEW_SERVER
private static final String[] REQUIRED_BUNDLE_IDS = new String[] {
"org.apache.commons.logging",
- "org.apache.commons.el",
"javax.servlet",
"javax.servlet.jsp",
- "org.apache.jasper",
- "org.mortbay.jetty.server",
- "org.mortbay.jetty.util",
+ "org.eclipse.jetty.server",
+ "org.eclipse.jetty.util",
+ "org.eclipse.jetty.continuation",
+ "org.eclipse.jetty.http",
+ "org.eclipse.jetty.io",
+ "org.eclipse.jetty.security",
+ "org.eclipse.jetty.servlet",
+ "javax.el",
+ "com.sun.el",
+ "org.apache.jasper.glassfish",
"org.eclipse.wst.server.preview"
};
private static final String MAIN_CLASS = "org.eclipse.wst.server.preview.internal.PreviewStarter";
+ // The index of org.eclipse.wst.server.preview in REQUIRED_BUNDLE_IDS, for supporting
+ // running on the workbench when the plug-in is checked out
+ private static final int CLASSPATH_BIN_INDEX_PREVIEW_SERVER = REQUIRED_BUNDLE_IDS.length-1;
public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
IServer server = ServerUtil.getServer(configuration);
@@ -73,9 +89,11 @@ public void launch(ILaunchConfiguration configuration, String mode, ILaunch laun
jars[i] = path.toOSString();
}
- Trace.trace(Trace.FINEST,jars[7] + File.separator + "bin");
- if (new File(jars[7] + File.separator + "bin").exists())
- jars[7] = jars[7] + File.separator + "bin";
+ // Appending the bin onto the classpath is to support running from the workbench
+ // when org.eclipse.wst.server.preview is checked out
+ Trace.trace(Trace.FINEST,jars[CLASSPATH_BIN_INDEX_PREVIEW_SERVER] + File.separator + "bin");
+ if (new File(jars[CLASSPATH_BIN_INDEX_PREVIEW_SERVER] + File.separator + "bin").exists())
+ jars[CLASSPATH_BIN_INDEX_PREVIEW_SERVER] = jars[CLASSPATH_BIN_INDEX_PREVIEW_SERVER] + File.separator + "bin";
IVMInstall vm = verifyVMInstall(configuration);

0 comments on commit d5811a0

Please sign in to comment.