diff --git a/.cvsignore b/.cvsignore index 999895f..7a85514 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -eclipse-sourceBuild-srcIncluded-3.2RC7.zip -eclipse-fedora-splash-3.2rc7.png +eclipse-sourceBuild-srcIncluded-3.2.zip +eclipse-fedora-splash-3.2.png diff --git a/eclipse-tomcat55-build.patch b/eclipse-tomcat55-build.patch new file mode 100644 index 0000000..bdc2f1e --- /dev/null +++ b/eclipse-tomcat55-build.patch @@ -0,0 +1,165 @@ +--- build.xml.orig 2006-07-04 16:09:31.000000000 -0400 ++++ build.xml 2006-07-04 16:14:19.000000000 -0400 +@@ -58,7 +58,7 @@ + + + +- ++ + + + +@@ -144,50 +144,51 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +@@ -224,37 +225,37 @@ + + + +- +- ++ ++ + + +- ++ + + +- ++ + + + + + + +- +- +- ++ ++ ++ + + + + + +- +- ++ ++ + + + + + +- +- ++ ++ + + + +@@ -277,7 +278,7 @@ + + + +- ++ + + + diff --git a/eclipse-tomcat55.patch b/eclipse-tomcat55.patch new file mode 100644 index 0000000..895cfd2 --- /dev/null +++ b/eclipse-tomcat55.patch @@ -0,0 +1,1598 @@ +Index: .classpath +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.tomcat/.classpath,v +retrieving revision 1.21 +diff -u -r1.21 .classpath +--- .classpath 9 May 2006 18:51:41 -0000 1.21 ++++ .classpath 4 Jul 2006 18:42:40 -0000 +@@ -1,28 +1,27 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +Index: build.properties +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.tomcat/build.properties,v +retrieving revision 1.16 +diff -u -r1.16 build.properties +--- build.properties 10 May 2006 17:51:19 -0000 1.16 ++++ build.properties 4 Jul 2006 18:42:40 -0000 +@@ -11,7 +11,7 @@ + bin.includes = conf/,\ + webapps/,\ + plugin.xml,\ +- *.jar,\ ++ lib/*.jar,\ + plugin.properties,\ + preferences.ini,\ + about.html,\ +Index: src/org/eclipse/tomcat/internal/TomcatPlugin.java +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.tomcat/src/org/eclipse/tomcat/internal/TomcatPlugin.java,v +retrieving revision 1.24 +diff -u -r1.24 TomcatPlugin.java +--- src/org/eclipse/tomcat/internal/TomcatPlugin.java 23 May 2005 03:58:20 -0000 1.24 ++++ src/org/eclipse/tomcat/internal/TomcatPlugin.java 4 Jul 2006 18:42:41 -0000 +@@ -24,13 +24,16 @@ + public final static String PREF_ACCEPT_COUNT = "acceptCount"; //$NON-NLS-1$ + public final static String PREF_MAX_PROCESSORS = "maxProcessors"; //$NON-NLS-1$ + public final static String PREF_MIN_PROCESSORS = "minProcessors"; //$NON-NLS-1$ ++ public final static String DISABLE_UPLOAD_TIMEOUT = "disableUploadTimeout"; //$NON-NLS-1$ + + public final static String PREF_SSL_PORT = "sslPort"; //$NON-NLS-1$ + public final static String PREF_SSL_PROTOCOL = "sslProtocol"; //$NON-NLS-1$ ++ public final static String PREF_SSL_PROTOCOLS = "sslProtocols"; //$NON-NLS-1$ + public final static String PREF_SSL_SCHEME = "sslScheme"; //$NON-NLS-1$ + public final static String PREF_SSL_ALGORITHM = "sslAlgorithm"; //$NON-NLS-1$ + public final static String PREF_KEY_STORE_FILE = "keyStoreFile"; //$NON-NLS-1$ + public final static String PREF_KEY_STORE_PASSWORD = "keyStorePassword"; //$NON-NLS-1$ ++ public final static String PREF_CLIENT_AUTHENTICATION = "clientauth"; //$NON-NLS-1$ + + private static TomcatPlugin plugin; + // private static BundleContext bundleContext; +Index: src/org/eclipse/tomcat/internal/TomcatAppServer.java +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.tomcat/src/org/eclipse/tomcat/internal/TomcatAppServer.java,v +retrieving revision 1.46 +diff -u -r1.46 TomcatAppServer.java +--- src/org/eclipse/tomcat/internal/TomcatAppServer.java 17 Apr 2006 15:24:57 -0000 1.46 ++++ src/org/eclipse/tomcat/internal/TomcatAppServer.java 4 Jul 2006 18:42:41 -0000 +@@ -1,604 +1,650 @@ +-/******************************************************************************* +- * Copyright (c) 2000, 2006 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 +- * http://www.eclipse.org/legal/epl-v10.html +- * +- * Contributors: +- * IBM Corporation - initial API and implementation +- *******************************************************************************/ +-package org.eclipse.tomcat.internal; +- +-import java.io.ByteArrayOutputStream; +-import java.io.PrintStream; +-import java.net.InetAddress; +-import java.net.URL; +-import java.net.UnknownHostException; +-import java.util.ArrayList; +- +-import org.apache.catalina.Connector; +-import org.apache.catalina.Context; +-import org.apache.catalina.Engine; +-import org.apache.catalina.Host; +-import org.apache.catalina.LifecycleEvent; +-import org.apache.catalina.LifecycleException; +-import org.apache.catalina.LifecycleListener; +-import org.apache.catalina.Realm; +-import org.apache.catalina.core.StandardContext; +-import org.apache.catalina.core.StandardHost; +-import org.apache.catalina.logger.FileLogger; +-import org.apache.catalina.realm.MemoryRealm; +-import org.apache.catalina.startup.Embedded; +-import org.apache.coyote.tomcat4.CoyoteConnector; +-import org.apache.coyote.tomcat4.CoyoteServerSocketFactory; +-import org.eclipse.core.runtime.CoreException; +-import org.eclipse.core.runtime.FileLocator; +-import org.eclipse.core.runtime.IConfigurationElement; +-import org.eclipse.core.runtime.IExtension; +-import org.eclipse.core.runtime.IExtensionPoint; +-import org.eclipse.core.runtime.IExtensionRegistry; +-import org.eclipse.core.runtime.IPath; +-import org.eclipse.core.runtime.IStatus; +-import org.eclipse.core.runtime.Platform; +-import org.eclipse.core.runtime.Preferences; +-import org.eclipse.core.runtime.Status; +-import org.eclipse.help.internal.appserver.IWebappServer; +-import org.eclipse.osgi.util.NLS; +-import org.eclipse.tomcat.internal.extensions.IRealmFactory; +- +-/** +- * Single engine, single host, single connector Tomcat Application Server. +- */ +-public class TomcatAppServer implements IWebappServer { +- /** +- * Specify this reserved value for the SSL port # to indicate that SSL +- * should not be used +- */ +- public final static int SSL_DISABLED = -1; +- +- private String hostAddress; +- +- private int port; +- +- private int sslPort = SSL_DISABLED; +- +- // false until an attempt to start Tomcat +- private boolean isStarted = false; +- +- // true after started without problems +- private boolean running = false; +- +- private Embedded embedded = null; +- +- private Engine engine = null; +- +- private Host host = null; +- +- private Connector httpConnector = null; +- private Connector sslConnector = null; +- // Con +- private ArrayList contexts = new ArrayList(); +- +- /** +- * Constructs this class, but does not instantiates or start Tomcat classes +- * until webapp are added. +- */ +- public TomcatAppServer() { +- } +- +- /** +- * @see org.eclipse.help.internal.appserver.IWebappServer#start(int, +- * java.lang.String) +- */ +- public synchronized void start(int port, String hostAddress) throws CoreException { +- this.hostAddress = hostAddress; +- this.port = port; +- +- if (isStarted) { +- return; +- } +- isStarted = true; +- try { +- FileLogger logger = new FileLogger(); +- logger.setDirectory(TomcatPlugin.getDefault().getStateLocation() +- .toOSString()); +- embedded = new Embedded(logger, new MemoryRealm()); +- embedded.setDebug(0); +- embedded.setLogger(logger); +- URL installURL = TomcatPlugin.getDefault().getBundle() +- .getEntry("/"); //$NON-NLS-1$ +- URL resolvedURL = FileLocator.resolve(installURL); +- String home = FileLocator.toFileURL(resolvedURL).getFile(); +- System.setProperty("catalina.home", home); //$NON-NLS-1$ +- String base = home; +- System.setProperty("catalina.base", base); //$NON-NLS-1$ +- +- // Set up realm if one found +- if (TomcatPlugin.getDefault().getPluginPreferences().getInt( +- TomcatPlugin.PREF_SSL_PORT) >= 0) { +- Realm realm = getRealm(); +- embedded.setRealm(realm); +- } +- +- // start now, and then add all the contexts.. +- embedded.start(); +- +- // Create a very basic container hierarchy +- engine = embedded.createEngine(); +- +- host = embedded.createHost("localhost", home + "/webapps"); //$NON-NLS-1$ //$NON-NLS-2$ +- +- // all request go to our only host +- engine.setDefaultHost(host.getName()); +- +- if (host instanceof StandardHost) { +- ((StandardHost) host) +- .setErrorReportValveClass("org.eclipse.tomcat.internal.EclipseErrorReportValve"); //$NON-NLS-1$ +- } +- engine.addChild(host); +- +- // Install the assembled container hierarchy +- PrintStream sysOut = System.out; +- // reassign standard output to prevent Tomcat from writing +- // its version message there. +- System.setOut(new PrintStream(new ByteArrayOutputStream())); +- try { +- embedded.addEngine(engine); +- } finally { +- System.setOut(sysOut); +- } +- +- // Root context +- Context root = embedded.createContext("", home + "/webapps/ROOT"); //$NON-NLS-1$ //$NON-NLS-2$ +- // this line should be replaced once tomcat provides support +- // for setting the working directory +- if (root instanceof StandardContext) { +- ((StandardContext) root) +- .setWorkDir(getWorkingDirectory("ROOT")); //$NON-NLS-1$ +- } +- root.setLoader(embedded.createLoader(this.getClass() +- .getClassLoader())); +- contexts.add(root); +- host.addChild(root); +- +- InetAddress iAddress = null; +- if (this.hostAddress != null) { +- try { +- iAddress = InetAddress.getByName(this.hostAddress); +- } catch (UnknownHostException uhe) { +- // will default to all interfaces +- } +- } +- updateSslPort(iAddress); +- if (this.port == 0) { +- this.port = SocketUtil.findUnusedLocalPort(iAddress); +- if (this.port == -1) { +- throw new CoreException( +- new Status( +- IStatus.ERROR, +- TomcatPlugin.PLUGIN_ID, +- IStatus.OK, +- TomcatResources.TomcatAppServer_start_CannotObtainPort, +- null)); +- } +- } +- +- // Create Connector +- Connector connector = embedded.createConnector(null, this.port, +- false); +- // Override defaults on CoyoteConnector +- if (connector instanceof CoyoteConnector) { +- CoyoteConnector connectorImpl = (CoyoteConnector) connector; +- if (iAddress != null) { +- // bug in Embedded that incorrectly sets host on connector. +- // pass null when creating connector, and set host here if +- // it is specified +- connectorImpl.setAddress(iAddress.getHostAddress()); +- } +- Preferences pref = TomcatPlugin.getDefault() +- .getPluginPreferences(); +- int acceptCount = pref.getInt(TomcatPlugin.PREF_ACCEPT_COUNT); +- if (acceptCount > 0) { +- connectorImpl.setAcceptCount(acceptCount); +- } +- int maxProcessors = pref +- .getInt(TomcatPlugin.PREF_MAX_PROCESSORS); +- if (maxProcessors > 0) { +- connectorImpl.setMaxProcessors(maxProcessors); +- } +- int minProcessors = pref +- .getInt(TomcatPlugin.PREF_MIN_PROCESSORS); +- if (minProcessors > 0) { +- connectorImpl.setMinProcessors(minProcessors); +- } +- if (this.sslPort > 0) { +- connectorImpl.setRedirectPort(this.sslPort); +- connectorImpl.setEnableLookups(true); +- connectorImpl.setConnectionTimeout(20000); +- connectorImpl.setUseURIValidationHack(false); +- connectorImpl.setDisableUploadTimeout(true); +- } +- // connectorImpl.setDebug(0); +- // If there is problem in embedded.addConnector() +- // there is no exception, so add a listener +- connectorImpl.addLifecycleListener(new LifecycleListener() { +- public void lifecycleEvent(LifecycleEvent event) { +- if ("start".equals(event.getType())) //$NON-NLS-1$ +- running = true; +- } +- }); +- } +- +- // add Connector to Tomcat +- PrintStream sysErr = System.err; +- // reassign standard error to prevent Coyote from writing +- // its version message there. +- System.setErr(new PrintStream(new ByteArrayOutputStream())); +- try { +- embedded.addConnector(connector); +- httpConnector = connector; +- } finally { +- System.setErr(sysErr); +- } +- +- if (this.sslPort > 0) { +- createSSLConnector(iAddress, this.sslPort); +- } +- +- // if null passed for hostAddress, use local host +- if (this.hostAddress == null) { +- this.hostAddress = "127.0.0.1"; //$NON-NLS-1$ +- } +- +- // running = true; +- TomcatPlugin.getDefault().setAppserver(this); +- +- } catch (Exception exc) { +- TomcatPlugin +- .logError( +- "Exception occurred starting the embedded application server.", //$NON-NLS-1$ +- exc); +- if (exc instanceof CoreException) { +- throw (CoreException) exc; +- } +- throw new CoreException(new Status(IStatus.ERROR, +- TomcatPlugin.PLUGIN_ID, IStatus.OK, +- TomcatResources.TomcatAppServer_start, +- exc)); +- } +- if (!running) { +- throw new CoreException(new Status(IStatus.ERROR, +- TomcatPlugin.PLUGIN_ID, IStatus.OK, +- TomcatResources.TomcatAppServer_start, null)); +- } +- } +- +- /** +- * Update {@link sslPort} to refer an appropriate port. If the user set +- * sslPort to 0, an arbitrary free port will be used. +- * +- * @param iAddress +- * {@link InetAddress} object representing the machine hosting +- * the help system +- * @return port number of use for the SSL connection +- * @throws CoreException +- */ +- private int updateSslPort(InetAddress iAddress) throws CoreException { +- this.sslPort = TomcatPlugin.getDefault().getPluginPreferences().getInt( +- TomcatPlugin.PREF_SSL_PORT); +- if (this.sslPort == 0) { +- this.sslPort = SocketUtil.findUnusedLocalPort(iAddress); +- if (this.sslPort == -1) { +- throw new CoreException(new Status(IStatus.ERROR, +- TomcatPlugin.PLUGIN_ID, IStatus.OK, +- TomcatResources.TomcatAppServer_start_CannotObtainPort, +- null)); +- } +- } +- return this.sslPort; +- } +- +- /** +- * @param iAddress +- * InetAddress representing the machine hosting the help system. +- * @param sslport +- * port # to use for the SSL connection +- * @throws CoreException +- */ +- private void createSSLConnector(InetAddress iAddress, int sslport) +- throws CoreException { +- // Create Connector +- this.sslConnector = embedded.createConnector(null, sslport, false); +- // Override defaults on CoyoteConnector +- if (this.sslConnector instanceof CoyoteConnector) { +- CoyoteConnector connectorImpl = (CoyoteConnector) this.sslConnector; +- if (iAddress != null) { +- // bug in Embedded that incorrectly sets host on connector. +- // pass null when creating connector, and set host here if +- // it is specified +- connectorImpl.setAddress(iAddress.getHostAddress()); +- } +- Preferences pref = TomcatPlugin.getDefault().getPluginPreferences(); +- int acceptCount = pref.getInt(TomcatPlugin.PREF_ACCEPT_COUNT); +- if (acceptCount > 0) { +- connectorImpl.setAcceptCount(acceptCount); +- } +- int maxProcessors = pref.getInt(TomcatPlugin.PREF_MAX_PROCESSORS); +- if (maxProcessors > 0) { +- connectorImpl.setMaxProcessors(maxProcessors); +- } +- int minProcessors = pref.getInt(TomcatPlugin.PREF_MIN_PROCESSORS); +- if (minProcessors > 0) { +- connectorImpl.setMinProcessors(minProcessors); +- } +- connectorImpl.setUseURIValidationHack(false); +- connectorImpl.setDisableUploadTimeout(true); +- connectorImpl.setSecure(true); +- String scheme = pref.getString(TomcatPlugin.PREF_SSL_SCHEME); +- if ((scheme != null) && (!("".equals(scheme.trim())))) { //$NON-NLS-1$ +- connectorImpl.setScheme(scheme); +- } +- connectorImpl.setEnableLookups(true); +- CoyoteServerSocketFactory factory = new CoyoteServerSocketFactory(); +- factory.setClientAuth(false); +- String protocol = pref.getString(TomcatPlugin.PREF_SSL_PROTOCOL); +- if ((protocol != null) && (!("".equals(protocol.trim())))) { //$NON-NLS-1$ +- factory.setProtocol(protocol); +- } +- String algorithm = pref.getString(TomcatPlugin.PREF_SSL_ALGORITHM); +- if ((algorithm != null) && (!("".equals(algorithm.trim())))) { //$NON-NLS-1$ +- factory.setAlgorithm(algorithm); +- } +- String keyStoreFile = pref +- .getString(TomcatPlugin.PREF_KEY_STORE_FILE); +- if ((keyStoreFile != null) && (!("".equals(keyStoreFile.trim())))) { //$NON-NLS-1$ +- factory.setKeystoreFile(keyStoreFile); +- } +- String keyStorePassword = pref +- .getString(TomcatPlugin.PREF_KEY_STORE_PASSWORD); +- if ((keyStorePassword != null) +- && (!("".equals(keyStorePassword.trim())))) { //$NON-NLS-1$ +- factory.setKeystorePass(keyStorePassword); +- } +- connectorImpl.setFactory(factory); +- connectorImpl.setDebug(0); +- // If there is problem in embedded.addConnector() +- // there is no exception, so add a listener +- connectorImpl.addLifecycleListener(new LifecycleListener() { +- public void lifecycleEvent(LifecycleEvent event) { +- if ("start".equals(event.getType())) //$NON-NLS-1$ +- running = true; +- } +- }); +- } +- +- // add Connector to Tomcat +- PrintStream sysErr = System.err; +- // reassign standard error to prevent Coyote from writing +- // its version message there. +- System.setErr(new PrintStream(new ByteArrayOutputStream())); +- try { +- embedded.addConnector(this.sslConnector); +- } finally { +- System.setErr(sysErr); +- } +- } +- +- /** +- * Creates a {@link Realm}object using the information contained in +- * extensions of the type org.eclipse.tomcat.realmfactory in the plugin +- * registry. +- * +- * @return the {@link Realm}object created +- */ +- private Realm getRealm() { +- IExtensionRegistry registry = Platform.getExtensionRegistry(); +- IExtensionPoint extensionPoint = registry.getExtensionPoint( +- TomcatPlugin.PLUGIN_ID, "realmfactory"); //$NON-NLS-1$ +- Realm realm = null; +- if (extensionPoint != null) { +- IExtension[] extensions = extensionPoint.getExtensions(); +- if ((extensions != null) && (extensions.length == 1)) { +- IConfigurationElement[] factoryElements = extensions[0] +- .getConfigurationElements(); +- if ((factoryElements != null) && (factoryElements.length == 1)) { +- try { +- IRealmFactory realmFactory = (IRealmFactory) factoryElements[0] +- .createExecutableExtension("class"); //$NON-NLS-1$ +- realm = realmFactory.createRealm(); +- } catch (CoreException e) { +- logError( +- TomcatResources.TomcatAppServer_getRealmFactoryFailed, +- e); +- } +- } else { +- if ((factoryElements == null) +- || (factoryElements.length == 0)) { +- logError(TomcatResources.TomcatAppServer_missingFactoryElement); +- } else { +- logError(TomcatResources.TomcatAppServer_multipleFactoryElements); +- } +- } +- } else { +- if ((extensions == null) || (extensions.length == 0)) { +- logError(TomcatResources.TomcatAppServer_missingRealmExtension); +- } else { +- logError(TomcatResources.TomcatAppServer_multipleRealmExtensions); +- } +- } +- } else { +- logError(TomcatResources.TomcatAppServer_missingRealmExtensionPoint); +- } +- return realm; +- } +- +- /** +- * Create an error entry in the log +- * +- * @param msg +- * error message +- */ +- private void logError(String msg) { +- logError(msg, null); +- } +- +- /** +- * Create an error entry in the log +- * +- * @param msg +- * error message +- * @param cause +- * {@link Throwable} associated with this error message +- */ +- private void logError(String msg, Throwable cause) { +- TomcatPlugin.logError(msg, cause); +- } +- +- /** +- * @see org.eclipse.help.internal.appserver.IWebappServer#start(java.lang.String, +- * org.eclipse.core.runtime.IPath, java.lang.ClassLoader) +- */ +- public synchronized void start(String webappName, IPath path, ClassLoader customLoader) +- throws CoreException { +- +- if (!isStarted) { +- start(port, hostAddress); +- } +- if (!running) { +- throw new CoreException(new Status(IStatus.ERROR, +- TomcatPlugin.PLUGIN_ID, IStatus.OK, NLS.bind( +- TomcatResources.TomcatAppServer_addingWebapp, +- webappName, path.toOSString()), null)); +- } +- +- String contextPath = webappName; +- if (!contextPath.startsWith("/")) { //$NON-NLS-1$ +- contextPath = "/" + contextPath; //$NON-NLS-1$ +- } +- try { +- Context context = embedded.createContext(contextPath, path +- .toOSString()); +- if (context instanceof StandardContext) { +- ((StandardContext) context) +- .setWorkDir(getWorkingDirectory(webappName)); +- } +- +- WebAppClassLoader webappLoader = new WebAppClassLoader(customLoader); +- context.setLoader(embedded.createLoader(webappLoader)); +- +- host.addChild(context); +- contexts.add(context); +- } catch (Exception exc) { +- throw new CoreException(new Status(IStatus.ERROR, +- TomcatPlugin.PLUGIN_ID, IStatus.OK, NLS.bind( +- "TomcatAppServer.addingWebapp", webappName, path //$NON-NLS-1$ +- .toOSString()), exc)); +- } +- } +- +- /** +- * @see org.eclipse.help.internal.appserver.IWebappServer#stop(java.lang.String) +- */ +- public synchronized void stop(String webappName) throws CoreException { +- if (!running) { +- return; +- } +- Context context = (Context) host.findChild("/" + webappName); //$NON-NLS-1$ +- if (context != null) { +- contexts.remove(context); +- embedded.removeContext(context); +- } +- } +- +- /** +- * @see org.eclipse.help.internal.appserver.IWebappServer#getHost() +- */ +- public String getHost() { +- if (!running) { +- return null; +- } +- return hostAddress; +- } +- +- /** +- * @see org.eclipse.help.internal.appserver.IWebappServer#getPort() +- */ +- public int getPort() { +- if (!running) { +- return 0; +- } +- return port; +- } +- +- /** +- * @see org.eclipse.help.internal.appserver.IWebappServer#isRunning() +- */ +- public boolean isRunning() { +- return running; +- } +- +- /** +- * @see org.eclipse.help.internal.appserver.IWebappServer#stop() +- */ +- public synchronized void stop() throws CoreException { +- if (!running) { +- return; +- } +- running = false; +- // Remove all contexts +- for(int i = 0; i< contexts.size(); i++){ +- embedded.removeContext((Context)contexts.get(i)); +- contexts.remove(contexts.get(i)); +- } +- +- // Remove the sslConnector, if present. +- try { +- if (sslConnector != null) { +- embedded.removeConnector(this.sslConnector); +- } +- } catch (Exception exc) { +- throw new CoreException(new Status(IStatus.ERROR, +- TomcatPlugin.PLUGIN_ID, IStatus.OK, +- TomcatResources.TomcatAppServer_sslConnectorRemove, +- exc)); +- } +- +- // Remove the HTTP Connector, if present. +- try { +- if (httpConnector != null) { +- embedded.removeConnector(this.httpConnector); +- } +- } catch (Exception exc) { +- throw new CoreException(new Status(IStatus.ERROR, +- TomcatPlugin.PLUGIN_ID, IStatus.OK, +- TomcatResources.TomcatAppServer_httpConnectorRemove, +- exc)); +- } +- +- // Remove the engine (which should trigger removing the connector) +- try { +- embedded.removeEngine(engine); +- } catch (Exception exc) { +- throw new CoreException(new Status(IStatus.ERROR, +- TomcatPlugin.PLUGIN_ID, IStatus.OK, +- TomcatResources.TomcatAppServer_engineRemove, +- exc)); +- } +- // Shut down this tomcat server (should have nothing left to do) +- try { +- embedded.stop(); +- } catch (LifecycleException e) { +- throw new CoreException(new Status(IStatus.ERROR, +- TomcatPlugin.PLUGIN_ID, IStatus.OK, +- TomcatResources.TomcatAppServer_embeddedStop, +- e)); +- } +- isStarted = false; +- } +- +- private String getWorkingDirectory(String webApp) { +- return TomcatPlugin.getDefault().getStateLocation().append(webApp) +- .toOSString(); +- } +-} ++/******************************************************************************* ++ * Copyright (c) 2000, 2006 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 ++ * http://www.eclipse.org/legal/epl-v10.html ++ * ++ * Contributors: ++ * IBM Corporation - initial API and implementation ++ *******************************************************************************/ ++package org.eclipse.tomcat.internal; ++ ++import java.io.ByteArrayOutputStream; ++import java.io.PrintStream; ++import java.net.InetAddress; ++import java.net.URL; ++import java.net.UnknownHostException; ++import java.util.ArrayList; ++ ++import mx4j.log.FileLogger; ++ ++import org.apache.catalina.Context; ++import org.apache.catalina.Engine; ++import org.apache.catalina.Host; ++import org.apache.catalina.Lifecycle; ++import org.apache.catalina.LifecycleEvent; ++import org.apache.catalina.LifecycleException; ++import org.apache.catalina.LifecycleListener; ++import org.apache.catalina.Realm; ++import org.apache.catalina.connector.Connector; ++import org.apache.catalina.core.StandardContext; ++import org.apache.catalina.core.StandardHost; ++import org.apache.catalina.realm.MemoryRealm; ++import org.apache.catalina.startup.Embedded; ++import org.apache.coyote.http11.Http11Protocol; ++import org.apache.tomcat.util.net.jsse.JSSEImplementation; ++import org.eclipse.core.runtime.CoreException; ++import org.eclipse.core.runtime.IConfigurationElement; ++import org.eclipse.core.runtime.IExtension; ++import org.eclipse.core.runtime.IExtensionPoint; ++import org.eclipse.core.runtime.IExtensionRegistry; ++import org.eclipse.core.runtime.IPath; ++import org.eclipse.core.runtime.IStatus; ++import org.eclipse.core.runtime.Platform; ++import org.eclipse.core.runtime.Preferences; ++import org.eclipse.core.runtime.Status; ++import org.eclipse.help.internal.appserver.IWebappServer; ++import org.eclipse.osgi.util.NLS; ++import org.eclipse.tomcat.internal.extensions.IRealmFactory; ++ ++/** ++ * Single engine, single host, single connector Tomcat Application Server. ++ */ ++public class TomcatAppServer implements IWebappServer { ++ /** ++ * Specify this reserved value for the SSL port # to indicate that SSL ++ * should not be used ++ */ ++ public final static int SSL_DISABLED = -1; ++ ++ private final static String NULL = null; ++ ++ private String hostAddress; ++ ++ private int port; ++ ++ private int sslPort = SSL_DISABLED; ++ ++ // false until an attempt to start Tomcat ++ private boolean isStarted = false; ++ ++ // true after started without problems ++ private boolean running = false; ++ ++ private Embedded embedded = null; ++ ++ private Engine engine = null; ++ ++ private Host host = null; ++ ++ private Connector httpConnector = null; ++ private boolean hasConnection = false; ++ private Connector sslConnector = null; ++ private boolean hasSSLConnection = false; ++ // Con ++ private ArrayList contexts = new ArrayList(); ++ ++ /** ++ * Constructs this class, but does not instantiates or start Tomcat classes ++ * until webapp are added. ++ */ ++ public TomcatAppServer() { ++ } ++ ++ /** ++ * @see org.eclipse.help.internal.appserver.IWebappServer#start(int, ++ * java.lang.String) ++ */ ++ public synchronized void start(int port, String hostAddress) throws CoreException { ++ // if null passed for hostAddress, use local host ++ if (hostAddress == null) { ++ this.hostAddress = "127.0.0.1"; //$NON-NLS-1$ ++ } else { ++ this.hostAddress = hostAddress; ++ } ++ InetAddress iAddress = null; ++ ++ //Defaults to LOCALHOST ++ try{ ++ iAddress = InetAddress.getByName(this.hostAddress); ++ } catch (UnknownHostException uhe) { ++ // will default to all interfaces ++ } ++ ++ String hostname = iAddress.getHostName(); ++ ++ this.port = port; ++ if (isStarted) { ++ return; ++ } ++ isStarted = true; ++ try { ++ embedded = new Embedded(new MemoryRealm()); ++ URL installURL = TomcatPlugin.getDefault().getBundle() ++ .getEntry("/"); //$NON-NLS-1$ ++ URL resolvedURL = Platform.resolve(installURL); ++ String home = Platform.asLocalURL(resolvedURL).getFile(); ++ System.setProperty("catalina.home", home); //$NON-NLS-1$ ++ String base = home; ++ System.setProperty("catalina.base", base); //$NON-NLS-1$ ++ ++ // Set up realm if one found ++ if (TomcatPlugin.getDefault().getPluginPreferences().getInt( ++ TomcatPlugin.PREF_SSL_PORT) >= 0) { ++ Realm realm = getRealm(); ++ embedded.setRealm(realm); ++ } ++ //the embedded application is now started by using embedded.start() ++ embedded.addLifecycleListener(new LifecycleListener(){ ++ public void lifecycleEvent(LifecycleEvent event) { ++ if (Lifecycle.START_EVENT.equals(event.getType())) ++ running = true; ++ } ++ ++ }); ++ // start now, and then add all the contexts.. ++ embedded.start(); ++ ++ // Create a very basic container hierarchy ++ engine = embedded.createEngine(); ++ ++ host = embedded.createHost(hostname, home + "webapps"); //$NON-NLS-1$ ++ ++ // all request go to our only host ++ engine.setDefaultHost(host.getName()); ++ ++ if (host instanceof StandardHost) { ++ ((StandardHost) host) ++ .setErrorReportValveClass("org.eclipse.tomcat.internal.EclipseErrorReportValve"); //$NON-NLS-1$ ++ } ++ ++ engine.addChild(host); ++ ++ // Install the assembled container hierarchy ++ PrintStream sysOut = System.out; ++ // reassign standard output to prevent Tomcat from writing ++ // its version message there. ++ System.setOut(new PrintStream(new ByteArrayOutputStream())); ++ try { ++ embedded.addEngine(engine); ++ } finally { ++ System.setOut(sysOut); ++ } ++ ++ // Root context ++ Context root = embedded.createContext("", home + "webapps/ROOT"); //$NON-NLS-1$ //$NON-NLS-2$ ++ // this line should be replaced once tomcat provides support ++ // for setting the working directory ++ if (root instanceof StandardContext) { ++ ((StandardContext) root) ++ .setWorkDir(getWorkingDirectory("ROOT")); //$NON-NLS-1$ ++ } ++ root.setLoader(embedded.createLoader(this.getClass() ++ .getClassLoader())); ++ ++ host.addChild(root); ++ contexts.add(root); ++ ++ updateSslPort(iAddress); ++ if (this.port == 0) { ++ this.port = SocketUtil.findUnusedLocalPort(iAddress); ++ if (this.port == -1) { ++ throw new CoreException( ++ new Status( ++ IStatus.ERROR, ++ TomcatPlugin.PLUGIN_ID, ++ IStatus.OK, ++ TomcatResources.TomcatAppServer_start_CannotObtainPort, ++ null)); ++ } ++ } ++ ++ // Create Connector ++ Connector connector = embedded.createConnector(iAddress.getHostAddress(), this.port,false);; ++ ++ Preferences pref = TomcatPlugin.getDefault() ++ .getPluginPreferences(); ++ /** ++ * To extend additional properties, make use of org.apache.tomcat.util.IntrospectionUtils ++ * A Connector will initialize a protocolhandler defaults to org.apache.coyote.http11.Http11Protocol ++ * format : connector.setProperty("STRING_PROP_NAME","STRING_PROP_VALUE"); ++ * ++ */ ++ ++ int acceptCount = pref.getInt(TomcatPlugin.PREF_ACCEPT_COUNT); ++ if (acceptCount > 0) { ++ connector.setProperty("backlog",""+acceptCount); //$NON-NLS-1$ //$NON-NLS-2$ ++ } ++ ++ int maxProcessors = pref ++ .getInt(TomcatPlugin.PREF_MAX_PROCESSORS); ++ if (maxProcessors > 0) { ++ connector.setProperty("maxThreads",""+maxProcessors); //$NON-NLS-1$ //$NON-NLS-2$ ++ } ++ ++ int minProcessors = pref ++ .getInt(TomcatPlugin.PREF_MIN_PROCESSORS); ++ if (minProcessors > 0) { ++ connector.setProperty("minSpareThreads",""+minProcessors); //$NON-NLS-1$ //$NON-NLS-2$ ++ } ++ ++ if (this.sslPort > 0) { ++ connector.setRedirectPort(this.sslPort); ++ connector.setEnableLookups(true); ++ connector.setProperty("soTimeout",""+20000); //$NON-NLS-1$ //$NON-NLS-2$ ++ //connector.setUseURIValidationHack(false); no longer available ++ connector.setUseBodyEncodingForURI(false); ++ String disableUploadTimeout = pref.getString(TomcatPlugin.DISABLE_UPLOAD_TIMEOUT); ++ if ((disableUploadTimeout != null) && (!("".equals(disableUploadTimeout.trim())))) { //$NON-NLS-1$ ++ connector.setProperty("disableUploadTimeout", disableUploadTimeout); //$NON-NLS-1$ ++ } ++ } ++ // connectorImpl.setDebug(0); ++ // If there is problem in embedded.addConnector() ++ // there is no exception, so add a listener ++ connector.addLifecycleListener(new LifecycleListener() { ++ public void lifecycleEvent(LifecycleEvent event) { ++ if (Lifecycle.START_EVENT.equals(event.getType())) ++ hasConnection = true; ++ } ++ }); ++ ++ // add Connector to Tomcat ++ PrintStream sysErr = System.err; ++ // reassign standard error to prevent Coyote from writing ++ // its version message there. ++ System.setErr(new PrintStream(new ByteArrayOutputStream())); ++ try { ++ this.httpConnector = connector; ++ embedded.addConnector(this.httpConnector); ++ httpConnector.start(); ++ } finally { ++ System.setErr(sysErr); ++ } ++ if (this.sslPort > 0) { ++ createSSLConnector(iAddress, this.sslPort); ++ } ++ ++ // running = true; ++ TomcatPlugin.getDefault().setAppserver(this); ++ ++ } catch (Exception exc) { ++ TomcatPlugin ++ .logError( ++ "Exception occurred starting the embedded application server.", //$NON-NLS-1$ ++ exc); ++ if (exc instanceof CoreException) { ++ throw (CoreException) exc; ++ } ++ throw new CoreException(new Status(IStatus.ERROR, ++ TomcatPlugin.PLUGIN_ID, IStatus.OK, ++ TomcatResources.TomcatAppServer_start, ++ exc)); ++ } ++ if (!running) { ++ throw new CoreException(new Status(IStatus.ERROR, ++ TomcatPlugin.PLUGIN_ID, IStatus.OK, ++ TomcatResources.TomcatAppServer_start, null)); ++ } ++ } ++ ++ /** ++ * Update {@link sslPort} to refer an appropriate port. If the user set ++ * sslPort to 0, an arbitrary free port will be used. ++ * ++ * @param iAddress ++ * {@link InetAddress} object representing the machine hosting ++ * the help system ++ * @return port number of use for the SSL connection ++ * @throws CoreException ++ */ ++ private int updateSslPort(InetAddress iAddress) throws CoreException { ++ this.sslPort = TomcatPlugin.getDefault().getPluginPreferences().getInt( ++ TomcatPlugin.PREF_SSL_PORT); ++ if (this.sslPort == 0) { ++ this.sslPort = SocketUtil.findUnusedLocalPort(iAddress); ++ if (this.sslPort == -1) { ++ throw new CoreException(new Status(IStatus.ERROR, ++ TomcatPlugin.PLUGIN_ID, IStatus.OK, ++ TomcatResources.TomcatAppServer_start_CannotObtainPort, ++ null)); ++ } ++ } ++ return this.sslPort; ++ } ++ ++ /** ++ * @param iAddress ++ * InetAddress representing the machine hosting the help system. ++ * @param sslport ++ * port # to use for the SSL connection ++ * @throws CoreException ++ */ ++ private void createSSLConnector(InetAddress iAddress, int sslport) ++ throws CoreException { ++ ++ // Create Connector ++ //Defaults to local if IAddress is null ++ Connector connector = embedded.createConnector(iAddress.getHostAddress(), this.port,false); ++ ++ //--------------------create the Protocol-----------------------// ++ Preferences pref = TomcatPlugin.getDefault().getPluginPreferences(); ++ /** ++ * To extend additional properties, make use of org.apache.tomcat.util.IntrospectionUtils ++ * A Connector will initialize a protocolhandler which initialize a SSLImplementation which initialize ++ * a ServerSocketFactory ++ * format : connector.setProperty("STRING_PROP_NAME","STRING_PROP_VALUE"); ++ * ++ */ ++ //----------------configure connector -------------------------------// ++ // by looking at the code, it seems like the protocol go in first ++ String protocol = pref.getString(TomcatPlugin.PREF_SSL_PROTOCOL); ++ if ((protocol != null) && (!("".equals(protocol.trim())))) { //$NON-NLS-1$ ++ connector.setProperty("protocol",protocol); //$NON-NLS-1$ ++ } ++ String protocols = pref.getString(TomcatPlugin.PREF_SSL_PROTOCOLS); ++ if ((protocols != null) && (!("".equals(protocols.trim())))) { //$NON-NLS-1$ ++ connector.setProperty("protocols",protocols); //$NON-NLS-1$ ++ } ++ String protocolClassName = Http11Protocol.class.getName(); ++ connector.setProtocol(protocolClassName); ++ ++ String JSSEImplementationName = JSSEImplementation.class.getName(); ++ connector.setProperty("sslImplementation",JSSEImplementationName); //$NON-NLS-1$ ++ ++ String disableUploadTimeout = pref.getString(TomcatPlugin.DISABLE_UPLOAD_TIMEOUT); ++ if ((disableUploadTimeout != null) && (!("".equals(disableUploadTimeout.trim())))) { //$NON-NLS-1$ ++ connector.setProperty("disableUploadTimeout", disableUploadTimeout); //$NON-NLS-1$ ++ } ++ ++ String algorithm = pref.getString(TomcatPlugin.PREF_SSL_ALGORITHM); ++ if ((algorithm != null) && (!("".equals(algorithm.trim())))) { //$NON-NLS-1$ ++ connector.setProperty("algorithm", algorithm); //$NON-NLS-1$ ++ } ++ int maxProcessors = pref.getInt(TomcatPlugin.PREF_MAX_PROCESSORS); ++ if (maxProcessors > 0) { ++ //connector.setMaxProcessors(maxProcessors); ++ connector.setProperty("maxThreads",""+maxProcessors); //$NON-NLS-1$ //$NON-NLS-2$ ++ } ++ int minProcessors = pref.getInt(TomcatPlugin.PREF_MIN_PROCESSORS); ++ if (minProcessors > 0) { ++ //connector.setMinProcessors(minProcessors); ++ connector.setProperty("minSpareThreads",""+minProcessors); //$NON-NLS-1$ //$NON-NLS-2$ ++ } ++ //this is making use of org.apache.tomcat.util.IntrospectionUtils ++ connector.setProperty("disableUploadTimeout",""+true); //$NON-NLS-1$ //$NON-NLS-2$ ++ String clientauth = pref.getString(TomcatPlugin.PREF_CLIENT_AUTHENTICATION); ++ if ((clientauth != null) && (!("".equals(clientauth.trim())))) { //$NON-NLS-1$ ++ connector.setProperty("clientauth",clientauth); //$NON-NLS-1$ ++ } ++ ++ int acceptCount = pref.getInt(TomcatPlugin.PREF_ACCEPT_COUNT); ++ if (acceptCount > 0) { ++ connector.setProperty("backlog",""+acceptCount); //$NON-NLS-1$ //$NON-NLS-2$ ++ } ++ ++ String keyStoreFile = pref ++ .getString(TomcatPlugin.PREF_KEY_STORE_FILE); ++ if ((keyStoreFile != null) && (!("".equals(keyStoreFile.trim())))) { //$NON-NLS-1$ ++ connector.setProperty("keystore", keyStoreFile); //$NON-NLS-1$ ++ } ++ String keyStorePassword = pref ++ .getString(TomcatPlugin.PREF_KEY_STORE_PASSWORD); ++ if ((keyStorePassword != null) ++ && (!("".equals(keyStorePassword.trim())))) { //$NON-NLS-1$ ++ connector.setProperty("keypass", keyStorePassword); //$NON-NLS-1$ ++ } ++ //connector.setUseURIValidationHack(false); --no longer avaliable, hope they fixed the bug ++ connector.setUseBodyEncodingForURI(false); ++ // connector.setSecure(true); ---setting ssLImplementation set secure to true ++ String scheme = pref.getString(TomcatPlugin.PREF_SSL_SCHEME); ++ if ((scheme != null) && (!("".equals(scheme.trim())))) { //$NON-NLS-1$ ++ connector.setScheme(scheme); ++ } ++ connector.setEnableLookups(true); ++ ++ //connector.setFactory(factory); --no longer needed, now handled by SSLImplemenatation ++ // If there is problem in embedded.addConnector() ++ // there is no exception, so add a listener ++ connector.addLifecycleListener(new LifecycleListener() { ++ public void lifecycleEvent(LifecycleEvent event) { ++ if (Lifecycle.START_EVENT.equals(event.getType())||Lifecycle.PERIODIC_EVENT.equals(event.getType())) ++ hasSSLConnection = true; ++ } ++ }); ++ // add Connector to Tomcat ++ PrintStream sysErr = (PrintStream) System.err; ++ // reassign standard error to prevent Coyote from writing ++ // its version message there. ++ System.setErr(new PrintStream(new ByteArrayOutputStream())); ++ try{ ++ sslConnector = connector; ++ embedded.addConnector(this.sslConnector); ++ sslConnector.start(); ++ } catch(LifecycleException e){ ++ TomcatPlugin ++ .logError( ++ "Exception occurred while establishing secure connection.", //$NON-NLS-1$ ++ e); ++ } ++ finally { ++ System.setErr(sysErr); ++ } ++ } ++ ++ /** ++ * Creates a {@link Realm}object using the information contained in ++ * extensions of the type org.eclipse.tomcat.realmfactory in the plugin ++ * registry. ++ * ++ * @return the {@link Realm}object created ++ */ ++ private Realm getRealm() { ++ IExtensionRegistry registry = Platform.getExtensionRegistry(); ++ IExtensionPoint extensionPoint = registry.getExtensionPoint( ++ TomcatPlugin.PLUGIN_ID, "realmfactory"); //$NON-NLS-1$ ++ Realm realm = null; ++ if (extensionPoint != null) { ++ IExtension[] extensions = extensionPoint.getExtensions(); ++ if ((extensions != null) && (extensions.length == 1)) { ++ IConfigurationElement[] factoryElements = extensions[0] ++ .getConfigurationElements(); ++ if ((factoryElements != null) && (factoryElements.length == 1)) { ++ try { ++ IRealmFactory realmFactory = (IRealmFactory) factoryElements[0] ++ .createExecutableExtension("class"); //$NON-NLS-1$ ++ realm = realmFactory.createRealm(); ++ } catch (CoreException e) { ++ logError( ++ TomcatResources.TomcatAppServer_getRealmFactoryFailed, ++ e); ++ } ++ } else { ++ if ((factoryElements == null) ++ || (factoryElements.length == 0)) { ++ logError(TomcatResources.TomcatAppServer_missingFactoryElement); ++ } else { ++ logError(TomcatResources.TomcatAppServer_multipleFactoryElements); ++ } ++ } ++ } else { ++ if ((extensions == null) || (extensions.length == 0)) { ++ logError(TomcatResources.TomcatAppServer_missingRealmExtension); ++ } else { ++ logError(TomcatResources.TomcatAppServer_multipleRealmExtensions); ++ } ++ } ++ } else { ++ logError(TomcatResources.TomcatAppServer_missingRealmExtensionPoint); ++ } ++ return realm; ++ } ++ ++ /** ++ * Create an error entry in the log ++ * ++ * @param msg ++ * error message ++ */ ++ private void logError(String msg) { ++ logError(msg, null); ++ } ++ ++ /** ++ * Create an error entry in the log ++ * ++ * @param msg ++ * error message ++ * @param cause ++ * {@link Throwable} associated with this error message ++ */ ++ private void logError(String msg, Throwable cause) { ++ TomcatPlugin.logError(msg, cause); ++ } ++ ++ /** ++ * @see org.eclipse.help.internal.appserver.IWebappServer#start(java.lang.String, ++ * org.eclipse.core.runtime.IPath, java.lang.ClassLoader) ++ */ ++ public synchronized void start(String webappName, IPath path, ClassLoader customLoader) ++ throws CoreException { ++ ++ if (!isStarted) { ++ start(port, hostAddress); ++ } ++ if (!running) { ++ throw new CoreException(new Status(IStatus.ERROR, ++ TomcatPlugin.PLUGIN_ID, IStatus.OK, NLS.bind( ++ TomcatResources.TomcatAppServer_addingWebapp, ++ webappName, path.toOSString()), null)); ++ } ++ String contextPath = webappName; ++ if (!contextPath.startsWith("/")) { //$NON-NLS-1$ ++ contextPath = "/" + contextPath; //$NON-NLS-1$ ++ } ++ try { ++ Context context = embedded.createContext(contextPath, path ++ .toOSString()); ++ if (context instanceof StandardContext) { ++ ((StandardContext) context) ++ .setWorkDir(getWorkingDirectory(webappName)); ++ } ++ ++ WebAppClassLoader webappLoader = new WebAppClassLoader(customLoader); ++ context.setLoader(embedded.createLoader(webappLoader)); ++ host.addChild(context); ++ contexts.add(context); ++ } catch (Exception exc) { ++ throw new CoreException(new Status(IStatus.ERROR, ++ TomcatPlugin.PLUGIN_ID, IStatus.OK, NLS.bind( ++ "TomcatAppServer.addingWebapp", webappName, path //$NON-NLS-1$ ++ .toOSString()), exc)); ++ } ++ } ++ ++ /** ++ * @see org.eclipse.help.internal.appserver.IWebappServer#stop(java.lang.String) ++ */ ++ public synchronized void stop(String webappName) throws CoreException { ++ if (!running) { ++ return; ++ } ++ Context context = (Context) host.findChild("/" + webappName); //$NON-NLS-1$ ++ if (context != null) { ++ contexts.remove(context); ++ embedded.removeContext(context); ++ } ++ } ++ ++ /** ++ * @see org.eclipse.help.internal.appserver.IWebappServer#getHost() ++ */ ++ public String getHost() { ++ if (!running) { ++ return null; ++ } ++ return hostAddress; ++ } ++ ++ /** ++ * @see org.eclipse.help.internal.appserver.IWebappServer#getPort() ++ */ ++ public int getPort() { ++ if (!running) { ++ return 0; ++ } ++ return port; ++ } ++ ++ /** ++ * @see org.eclipse.help.internal.appserver.IWebappServer#isRunning() ++ */ ++ public boolean isRunning() { ++ return running; ++ } ++ ++ /** ++ * @see org.eclipse.help.internal.appserver.IWebappServer#stop() ++ */ ++ public synchronized void stop() throws CoreException { ++ if (!running) { ++ return; ++ } ++ running = false; ++ // Remove all contexts ++ for(int i = 0; i< contexts.size(); i++){ ++ embedded.removeContext((Context)contexts.get(i)); ++ contexts.remove(contexts.get(i)); ++ } ++ ++ // Remove the sslConnector, if present. ++ try { ++ if (sslConnector != null) { ++ embedded.removeConnector(this.sslConnector); ++ } ++ } catch (Exception exc) { ++ throw new CoreException(new Status(IStatus.ERROR, ++ TomcatPlugin.PLUGIN_ID, IStatus.OK, ++ TomcatResources.TomcatAppServer_sslConnectorRemove, ++ exc)); ++ } ++ ++ // Remove the HTTP Connector, if present. ++ try { ++ if (httpConnector != null) { ++ embedded.removeConnector(this.httpConnector); ++ } ++ } catch (Exception exc) { ++ throw new CoreException(new Status(IStatus.ERROR, ++ TomcatPlugin.PLUGIN_ID, IStatus.OK, ++ TomcatResources.TomcatAppServer_httpConnectorRemove, ++ exc)); ++ } ++ ++ // Remove the engine (which should trigger removing the connector) ++ try { ++ embedded.removeEngine(engine); ++ } catch (Exception exc) { ++ throw new CoreException(new Status(IStatus.ERROR, ++ TomcatPlugin.PLUGIN_ID, IStatus.OK, ++ TomcatResources.TomcatAppServer_engineRemove, ++ exc)); ++ } ++ // Shut down this tomcat server (should have nothing left to do) ++ try { ++ embedded.stop(); ++ } catch (LifecycleException e) { ++ throw new CoreException(new Status(IStatus.ERROR, ++ TomcatPlugin.PLUGIN_ID, IStatus.OK, ++ TomcatResources.TomcatAppServer_embeddedStop, ++ e)); ++ } ++ isStarted = false; ++ } ++ ++ private String getWorkingDirectory(String webApp) { ++ return TomcatPlugin.getDefault().getStateLocation().append(webApp) ++ .toOSString(); ++ } ++} +\ No newline at end of file +Index: src/org/eclipse/tomcat/internal/EclipseErrorReportValve.java +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.tomcat/src/org/eclipse/tomcat/internal/EclipseErrorReportValve.java,v +retrieving revision 1.9 +diff -u -r1.9 EclipseErrorReportValve.java +--- src/org/eclipse/tomcat/internal/EclipseErrorReportValve.java 23 Feb 2006 22:51:14 -0000 1.9 ++++ src/org/eclipse/tomcat/internal/EclipseErrorReportValve.java 4 Jul 2006 18:42:41 -0000 +@@ -69,15 +69,27 @@ + package org.eclipse.tomcat.internal; + + +-import java.io.*; +-import java.util.*; +- +-import javax.servlet.*; +-import javax.servlet.http.*; +- +-import org.apache.catalina.*; +-import org.apache.catalina.util.*; +-import org.apache.catalina.valves.*; ++import java.io.IOException; ++import java.io.PrintWriter; ++import java.io.StringWriter; ++import java.io.Writer; ++import java.util.Locale; ++ ++import javax.servlet.ServletException; ++import javax.servlet.ServletRequest; ++import javax.servlet.ServletResponse; ++import javax.servlet.http.HttpServletResponse; ++ ++import mx4j.log.Logger; ++ ++import org.apache.catalina.Globals; ++import org.apache.catalina.Valve; ++import org.apache.catalina.connector.Request; ++import org.apache.catalina.connector.Response; ++import org.apache.catalina.util.RequestUtil; ++import org.apache.catalina.util.StringManager; ++import org.apache.catalina.valves.Constants; ++import org.apache.catalina.valves.ValveBase; + import org.eclipse.core.runtime.Platform; + + +@@ -145,12 +157,12 @@ + * @exception IOException if an input/output error occurs + * @exception ServletException if a servlet error occurs + */ +- public void invoke(Request request, Response response, +- ValveContext context) ++ public void invoke(Request request, Response response) + throws IOException, ServletException { + + // Perform the request +- context.invokeNext(request, response); ++ Valve nextValve = getNext(); ++ nextValve.invoke(request, response); + + ServletRequest sreq = (ServletRequest) request; + Throwable throwable = +@@ -220,14 +232,11 @@ + throws IOException { + + // Do nothing on non-HTTP responses +- if (!(response instanceof HttpResponse)) +- return; +- HttpResponse hresponse = (HttpResponse) response; + if (!(response instanceof HttpServletResponse)) + return; + HttpServletResponse hres = (HttpServletResponse) response; +- int statusCode = hresponse.getStatus(); +- String message = RequestUtil.filter(hresponse.getMessage()); ++ int statusCode = response.getStatus(); ++ String message = RequestUtil.filter(response.getMessage()); + if (message == null) + message = ""; //$NON-NLS-1$ + +@@ -373,9 +382,9 @@ + */ + protected void log(String message) { + +- Logger logger = container.getLogger(); ++ Logger logger = (Logger) container.getLogger(); + if (logger != null) +- logger.log(this.toString() + ": " + message); //$NON-NLS-1$ ++ logger.info(this.toString() + ": " + message); //$NON-NLS-1$ + else + System.out.println(this.toString() + ": " + message); //$NON-NLS-1$ + +@@ -390,9 +399,9 @@ + */ + protected void log(String message, Throwable throwable) { + +- Logger logger = container.getLogger(); ++ Logger logger = (Logger) container.getLogger(); + if (logger != null) +- logger.log(this.toString() + ": " + message, throwable); //$NON-NLS-1$ ++ logger.info(this.toString() + ": " + message, throwable); //$NON-NLS-1$ + else { + System.out.println(this.toString() + ": " + message); //$NON-NLS-1$ + throwable.printStackTrace(System.out); +Index: META-INF/MANIFEST.MF +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.tomcat/META-INF/MANIFEST.MF,v +retrieving revision 1.21 +diff -u -r1.21 MANIFEST.MF +--- META-INF/MANIFEST.MF 9 May 2006 20:26:52 -0000 1.21 ++++ META-INF/MANIFEST.MF 4 Jul 2006 18:42:40 -0000 +@@ -2,30 +2,30 @@ + Bundle-ManifestVersion: 2 + Bundle-Name: %pluginName + Bundle-SymbolicName: org.eclipse.tomcat; singleton:=true +-Bundle-Version: 4.1.130.qualifier ++Bundle-Version: 5.5.15.qualifier + Bundle-ClassPath: tomcatwrapper.jar, +- catalina.jar, +- bootstrap.jar, +- commons-beanutils.jar, +- commons-collections.jar, +- commons-digester.jar, +- commons-logging-api.jar, +- commons-modeler.jar, +- jakarta-regexp-1.3.jar, +- jasper-compiler.jar, +- jasper-runtime.jar, +- mx4j-jmx.jar, +- naming-common.jar, +- naming-factory.jar, +- naming-resources.jar, +- servlet.jar, +- servlets-common.jar, +- servlets-default.jar, +- servlets-invoker.jar, +- servlets-manager.jar, +- tomcat-coyote.jar, +- tomcat-http11.jar, +- tomcat-util.jar ++ lib/catalina.jar, ++ lib/catalina-optional.jar, ++ lib/commons-beanutils.jar, ++ lib/commons-collections.jar, ++ lib/commons-digester.jar, ++ lib/commons-digester-rss.jar, ++ lib/commons-el.jar, ++ lib/commons-logging-api.jar, ++ lib/commons-modeler.jar, ++ lib/jasper-compiler.jar, ++ lib/jasper-runtime.jar, ++ lib/jmx.jar, ++ lib/jsp-api.jar, ++ lib/naming-factory.jar, ++ lib/naming-resources.jar, ++ lib/regexp.jar, ++ lib/servlet-api.jar, ++ lib/servlets-default.jar, ++ lib/tomcat-coyote.jar, ++ lib/tomcat-http.jar, ++ lib/tomcat-util.jar, ++ lib/servlets-invoker.jar + Bundle-Activator: org.eclipse.tomcat.internal.TomcatPlugin + Bundle-Vendor: %providerName + Bundle-Localization: plugin +@@ -33,6 +33,74 @@ + org.apache.ant;bundle-version="[1.6.5,1.7.0)";resolution:=optional, + org.eclipse.core.runtime;bundle-version="[3.1.0,4.0.0)" + Eclipse-LazyStart: true +-Export-Package: org.eclipse.tomcat.internal;x-internal:=true, ++Eclipse-BuddyPolicy: global ++Export-Package: javax.management;x-internal:=true, ++ javax.management.loading;x-internal:=true, ++ javax.management.modelmbean;x-internal:=true, ++ javax.management.monitor;x-internal:=true, ++ javax.management.openmbean;x-internal:=true, ++ javax.management.relation;x-internal:=true, ++ javax.management.timer;x-internal:=true, ++ javax.servlet;x-internal:=true, ++ javax.servlet.http;x-internal:=true, ++ javax.servlet.jsp;x-internal:=true, ++ javax.servlet.jsp.tagext;x-internal:=true, ++ mx4j;x-internal:=true, ++ mx4j.loading;x-internal:=true, ++ mx4j.log;x-internal:=true, ++ mx4j.persist;x-internal:=true, ++ mx4j.server;x-internal:=true, ++ mx4j.server.interceptor;x-internal:=true, ++ mx4j.timer;x-internal:=true, ++ mx4j.util;x-internal:=true, ++ org.apache.catalina;x-internal:=true, ++ org.apache.catalina.connector;x-internal:=true, ++ org.apache.catalina.core;x-internal:=true, ++ org.apache.catalina.realm;x-internal:=true, ++ org.apache.catalina.servlets;x-internal:=true, ++ org.apache.commons.beanutils;x-internal:=true, ++ org.apache.commons.beanutils.converters;x-internal:=true, ++ org.apache.commons.beanutils.locale;x-internal:=true, ++ org.apache.commons.beanutils.locale.converters;x-internal:=true, ++ org.apache.commons.collections;x-internal:=true, ++ org.apache.commons.collections.comparators;x-internal:=true, ++ org.apache.commons.collections.iterators;x-internal:=true, ++ org.apache.commons.digester;x-internal:=true, ++ org.apache.commons.digester.rss;x-internal:=true, ++ org.apache.commons.digester.xmlrules;x-internal:=true, ++ org.apache.commons.logging;x-internal:=true, ++ org.apache.commons.logging.impl;x-internal:=true, ++ org.apache.commons.modeler;x-internal:=true, ++ org.apache.commons.modeler.ant;x-internal:=true, ++ org.apache.commons.modeler.mbeans;x-internal:=true, ++ org.apache.commons.modeler.modules;x-internal:=true, ++ org.apache.commons.modeler.util;x-internal:=true, ++ org.apache.coyote;x-internal:=true, ++ org.apache.coyote.http11;x-internal:=true, ++ org.apache.coyote.http11.filters;x-internal:=true, ++ org.apache.coyote.memory;x-internal:=true, ++ org.apache.jasper;x-internal:=true, ++ org.apache.jasper.compiler;x-internal:=true, ++ org.apache.jasper.runtime;x-internal:=true, ++ org.apache.jasper.servlet;x-internal:=true, ++ org.apache.jasper.util;x-internal:=true, ++ org.apache.jasper.xmlparser;x-internal:=true, ++ org.apache.naming;x-internal:=true, ++ org.apache.naming.factory;x-internal:=true, ++ org.apache.naming.java;x-internal:=true, ++ org.apache.naming.resources;x-internal:=true, ++ org.apache.regexp;x-internal:=true, ++ org.apache.tomcat.util;x-internal:=true, ++ org.apache.tomcat.util.buf;x-internal:=true, ++ org.apache.tomcat.util.collections;x-internal:=true, ++ org.apache.tomcat.util.http;x-internal:=true, ++ org.apache.tomcat.util.http.mapper;x-internal:=true, ++ org.apache.tomcat.util.log;x-internal:=true, ++ org.apache.tomcat.util.net;x-internal:=true, ++ org.apache.tomcat.util.net.jsse;x-internal:=true, ++ org.apache.tomcat.util.res;x-internal:=true, ++ org.apache.tomcat.util.threads;x-internal:=true, ++ org.eclipse.tomcat.internal;x-internal:=true, ++ org.eclipse.tomcat.internal;x-internal:=true, + org.eclipse.tomcat.internal.extensions;x-internal:=true + Bundle-RequiredExecutionEnvironment: J2SE-1.4 diff --git a/eclipse-webapp-tomcat55.patch b/eclipse-webapp-tomcat55.patch new file mode 100644 index 0000000..c61c88f --- /dev/null +++ b/eclipse-webapp-tomcat55.patch @@ -0,0 +1,87 @@ +Index: build.xml +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.help.webapp/build.xml,v +retrieving revision 1.71 +diff -u -r1.71 build.xml +--- build.xml 16 Mar 2006 21:57:15 -0000 1.71 ++++ build.xml 4 Jul 2006 18:26:11 -0000 +@@ -84,8 +84,8 @@ + + + +- +- ++ ++ + + + +@@ -141,8 +141,12 @@ + + + +- +- ++ ++ ++ ++ ++ ++ + + + +@@ -170,21 +174,19 @@ + + + +- +- +- +- +- ++ ++ ++ ++ + + + + +- + + + +@@ -222,8 +224,9 @@ + + + +- +- ++ ++ ++ + + + +Index: build.properties +=================================================================== +RCS file: /cvsroot/eclipse/org.eclipse.help.webapp/build.properties,v +retrieving revision 1.32 +diff -u -r1.32 build.properties +--- build.properties 18 Mar 2005 08:00:28 -0000 1.32 ++++ build.properties 4 Jul 2006 18:26:11 -0000 +@@ -33,5 +33,5 @@ + ../org.eclipse.help.appserver/bin,\ + ../org.eclipse.help.appserver,\ + ../org.eclipse.help.appserver/@dot,\ +- ../org.eclipse.tomcat/servlet.jar,\ +- ../org.eclipse.tomcat/jasper-runtime.jar ++ ../org.eclipse.tomcat/lib/servletapi5.jar,\ ++ ../org.eclipse.tomcat/lib/jasper-runtime.jar diff --git a/eclipse.spec b/eclipse.spec index f741a04..c2277e6 100644 --- a/eclipse.spec +++ b/eclipse.spec @@ -1,3 +1,8 @@ +# TODO: +# - migrate compare API patch (patch33) to 3.2 final +# - migrate cairo patch (patch43) to 3.2 final +# - migrate GNU formatter patches (patch20, patch21) to 3.2 final + Epoch: 1 %define fedora 1 @@ -36,16 +41,16 @@ Epoch: 1 Summary: %{pkg_summary} Name: eclipse Version: %{eclipse_majmin}.%{eclipse_micro} -Release: 0jpp_0fc.3.2RC7.7 +Release: 1jpp_1fc License: EPL Group: Text Editors/Integrated Development Environments (IDE) URL: http://www.eclipse.org/ -Source0: http://download.eclipse.org/eclipse/downloads/drops/S-3.2RC7-200606021317/eclipse-sourceBuild-srcIncluded-3.2RC7.zip +Source0: http://download.eclipse.org/eclipse/downloads/drops/R-3.2-200606291905/eclipse-sourceBuild-srcIncluded-3.2.zip Source2: %{name}.desktop Source5: %{name}-48.png Source6: %{name}.conf %if %{fedora} -Source11: %{name}-fedora-splash-3.2rc7.png +Source11: %{name}-fedora-splash-3.2.png %endif %if %{redhat} Source11: %{name}-redhat-splash.png @@ -56,9 +61,6 @@ Source19: %{name}-filenamepatterns.txt Source20: ecj.sh.in Source21: rebuild-sdk-features - - - # Build libswt-mozilla and libswt-cairo and use O2 # https://bugs.eclipse.org/bugs/show_bug.cgi?id=71637 Patch0: %{name}-libswt-enableallandO2.patch @@ -83,7 +85,6 @@ Patch38: %{name}-helpindexbuilder.patch Patch40: %{name}-usebuiltlauncher.patch ## Build cairo native libs #Patch43: %{name}-libswt-cairo1.0-3.patch -Patch45: %{name}-webapp-jasper-classpath.patch Patch46: %{name}-libswt-xpcomgcc4.patch # https://bugs.eclipse.org/bugs/show_bug.cgi?id=79592 # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=168726 @@ -101,13 +102,13 @@ Patch53: %{name}-pde.build-add-package-build.patch # We need to disable junit4 and apt until GCJ can handle Java5 code Patch55: %{name}-disable-junit4-apt.patch -# these patches need to go upstream +# These patches need to go upstream # https://bugs.eclipse.org/bugs/show_bug.cgi?id=98371 -#Patch28: %{name}-tomcat5.patch -#Patch29: %{name}-tomcat5-build.patch -#Patch30: %{name}-tomcat5-build.2.patch -#Patch50: %{name}-tomcat5-build.3.patch -#Patch31: %{name}-webapp-tomcat5.patch +Patch28: %{name}-tomcat55.patch +Patch29: %{name}-tomcat55-build.patch +Patch30: %{name}-tomcat55-build.2.patch +Patch50: %{name}-tomcat55-build.3.patch +Patch31: %{name}-webapp-tomcat55.patch # https://bugs.eclipse.org/bugs/show_bug.cgi?id=98707 # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=178726 Patch33: %{name}-compare-create-api.patch @@ -122,12 +123,6 @@ Patch22: %{name}-updatehomedir.patch # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=162177 Patch34: %{name}-bz162177.patch -# these patches should be in 3.2 final -Patch100: customBuildCallbacks.xml-add-pre.gather.bin.parts.patch -Patch101: org.eclipse.platform.doc.isv-rm-org.eclipse.ui.workbench-Eclipse-UI-Components.patch - - - %if %{gcj_support} %else ExclusiveArch: %{ix86} x86_64 ppc ia64 @@ -207,8 +202,7 @@ Eclipse compiler for Java. Summary: Eclipse platform common files Group: Text Editors/Integrated Development Environments (IDE) Provides: %{name} = %{epoch}:%{version}-%{release} -Obsoletes: %{name}-sdk %{name}-ui %{name}-gtk2 %{name}-scripts eclipse -Provides: %{name}-sdk = %{epoch}:%{version}-%{release} +Obsoletes: %{name}-ui %{name}-gtk2 %{name}-scripts eclipse Provides: %{name}-ui = %{epoch}:%{version}-%{release} Provides: %{name}-scripts = %{epoch}:%{version}-%{release} Provides: %{name}-gtk2 = %{epoch}:%{version}-%{release} @@ -386,14 +380,6 @@ Source for RCP for use within Eclipse. %prep %setup -q -c -pushd plugins/org.eclipse.platform.doc.isv -%patch100 -p0 -%patch101 -p0 -popd -pushd plugins/org.eclipse.platform.doc.user -%patch100 -p0 -popd - # I hate spaces in paths with patch! pushd plugins/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library %patch0 -p0 @@ -412,14 +398,14 @@ popd # tomcat patches pushd plugins/org.eclipse.tomcat -#%patch28 -p0 -#%patch29 -p0 +%patch28 -p0 +%patch29 -p0 +popd +%patch30 -p0 +%patch50 -p1 +pushd plugins/org.eclipse.help.webapp +%patch31 -p0 popd -#%patch30 -p0 -#%patch50 -p1 -#pushd plugins/org.eclipse.help.webapp -#%patch31 -p0 -#popd pushd plugins/org.eclipse.compare #%patch33 -p0 popd @@ -429,7 +415,6 @@ popd %patch38 -p0 %patch40 -p0 #%patch43 -%patch45 pushd plugins/org.eclipse.swt/Eclipse\ SWT\ Mozilla/common/library %patch46 popd @@ -466,7 +451,7 @@ pushd plugins/org.eclipse.swt/Eclipse\ SWT %patch54 popd -%patch55 -p1 +%patch55 -p0 rm plugins/org.junit4/junit-4.1.jar pushd plugins/org.eclipse.platform @@ -588,51 +573,50 @@ rm com.jcraft.jsch_*.jar popd ## BEGIN TOMCAT ## -#rm plugins/org.eclipse.tomcat/commons-beanutils.jar -#rm plugins/org.eclipse.tomcat/commons-collections.jar -#rm plugins/org.eclipse.tomcat/commons-digester.jar -#rm plugins/org.eclipse.tomcat/commons-logging-api.jar -#rm plugins/org.eclipse.tomcat/commons-modeler.jar -#rm plugins/org.eclipse.tomcat/jakarta-regexp-1.3.jar -#rm plugins/org.eclipse.tomcat/servlet.jar -#rm plugins/org.eclipse.tomcat/servlets-manager.jar -#rm plugins/org.eclipse.tomcat/naming-common.jar -#rm plugins/org.eclipse.tomcat/servlets-common.jar -#rm plugins/org.eclipse.tomcat/tomcat-http11.jar -#ln -s %{tomcatsharedir}/bin/bootstrap.jar plugins/org.eclipse.tomcat/bootstrap.jar -#ln -s %{tomcatlibdir}/server/lib/catalina.jar plugins/org.eclipse.tomcat/catalina.jar -#ln -s %{tomcatlibdir}/server/lib/catalina-optional.jar plugins/org.eclipse.tomcat/catalina-optional.jar -#ln -s %{_javadir}/jakarta-commons-beanutils.jar plugins/org.eclipse.tomcat/jakarta-commons-beanutils.jar -#ln -s %{_javadir}/jakarta-commons-collections.jar plugins/org.eclipse.tomcat/jakarta-commons-collections.jar -#ln -s %{_javadir}/jakarta-commons-dbcp.jar plugins/org.eclipse.tomcat/jakarta-commons-dbcp.jar -#ln -s %{_javadir}/jakarta-commons-digester.jar plugins/org.eclipse.tomcat/jakarta-commons-digester.jar -#ln -s %{_javadir}/jakarta-commons-digester-rss.jar plugins/org.eclipse.tomcat/jakarta-commons-digester-rss.jar -#ln -s %{_javadir}/jakarta-commons-el.jar plugins/org.eclipse.tomcat/jakarta-commons-el.jar -#ln -s %{_javadir}/jakarta-commons-fileupload.jar plugins/org.eclipse.tomcat/jakarta-commons-fileupload.jar -#ln -s %{_javadir}/jakarta-commons-launcher.jar plugins/org.eclipse.tomcat/jakarta-commons-launcher.jar -#ln -s %{_javadir}/jakarta-commons-logging.jar plugins/org.eclipse.tomcat/jakarta-commons-logging.jar -#ln -s %{_javadir}/jakarta-commons-modeler.jar plugins/org.eclipse.tomcat/jakarta-commons-modeler.jar -#ln -s %{_javadir}/jakarta-commons-pool.jar plugins/org.eclipse.tomcat/jakarta-commons-pool.jar -#ln -s %{_javadir}/jasper5-compiler.jar plugins/org.eclipse.tomcat/jasper-compiler.jar -#ln -s %{_javadir}/jasper5-runtime.jar plugins/org.eclipse.tomcat/jasper-runtime.jar -#ln -s %{_javadir}/jspapi.jar plugins/org.eclipse.tomcat/jspapi.jar -#ln -s %{_javadir}/mx4j/mx4j.jar plugins/org.eclipse.tomcat/mx4j.jar -#ln -s %{_javadir}/mx4j/mx4j-impl.jar plugins/org.eclipse.tomcat/mx4j-impl.jar -#ln -s %{_javadir}/mx4j/mx4j-jmx.jar plugins/org.eclipse.tomcat/mx4j-jmx.jar -#ln -s %{tomcatlibdir}/common/lib/naming-common.jar plugins/org.eclipse.tomcat/naming-common.jar -#ln -s %{tomcatlibdir}/common/lib/naming-factory.jar plugins/org.eclipse.tomcat/naming-factory.jar -#ln -s %{tomcatlibdir}/common/lib/naming-resources.jar plugins/org.eclipse.tomcat/naming-resources.jar -#ln -s %{_javadir}/regexp.jar plugins/org.eclipse.tomcat/regexp.jar -#ln -s %{_javadir}/servletapi5.jar plugins/org.eclipse.tomcat/servletapi5.jar -#ln -s %{tomcatlibdir}/server/lib/servlets-common.jar plugins/org.eclipse.tomcat/servlets-common.jar -#ln -s %{tomcatlibdir}/server/lib/servlets-default.jar plugins/org.eclipse.tomcat/servlets-default.jar -#ln -s %{tomcatlibdir}/server/lib/servlets-invoker.jar plugins/org.eclipse.tomcat/servlets-invoker.jar -#ln -s %{tomcatlibdir}/server/lib/tomcat-coyote.jar plugins/org.eclipse.tomcat/tomcat-coyote.jar -#ln -s %{tomcatlibdir}/server/lib/tomcat-http11.jar plugins/org.eclipse.tomcat/tomcat-http11.jar -#ln -s %{tomcatlibdir}/server/lib/tomcat-util.jar plugins/org.eclipse.tomcat/tomcat-util.jar +rm plugins/org.eclipse.tomcat/commons-beanutils.jar +rm plugins/org.eclipse.tomcat/commons-collections.jar +rm plugins/org.eclipse.tomcat/commons-digester.jar +rm plugins/org.eclipse.tomcat/commons-logging-api.jar +rm plugins/org.eclipse.tomcat/commons-modeler.jar +rm plugins/org.eclipse.tomcat/jakarta-regexp-1.3.jar +rm plugins/org.eclipse.tomcat/servlet.jar +rm plugins/org.eclipse.tomcat/servlets-manager.jar +rm plugins/org.eclipse.tomcat/naming-common.jar +rm plugins/org.eclipse.tomcat/servlets-common.jar +rm plugins/org.eclipse.tomcat/tomcat-http11.jar +ln -s %{tomcatsharedir}/bin/bootstrap.jar plugins/org.eclipse.tomcat/bootstrap.jar +ln -s %{tomcatlibdir}/server/lib/catalina.jar plugins/org.eclipse.tomcat/catalina.jar +ln -s %{tomcatlibdir}/server/lib/catalina-optional.jar plugins/org.eclipse.tomcat/catalina-optional.jar +ln -s %{_javadir}/jasper5-compiler.jar plugins/org.eclipse.tomcat/jasper-compiler.jar +ln -s %{_javadir}/jasper5-runtime.jar plugins/org.eclipse.tomcat/jasper-runtime.jar +ln -s %{_javadir}/mx4j/mx4j.jar plugins/org.eclipse.tomcat/mx4j.jar +ln -s %{_javadir}/mx4j/mx4j-impl.jar plugins/org.eclipse.tomcat/mx4j-impl.jar +ln -s %{_javadir}/mx4j/mx4j-jmx.jar plugins/org.eclipse.tomcat/mx4j-jmx.jar +ln -s %{tomcatlibdir}/common/lib/naming-common.jar plugins/org.eclipse.tomcat/naming-common.jar +ln -s %{tomcatlibdir}/common/lib/naming-factory.jar plugins/org.eclipse.tomcat/naming-factory.jar +ln -s %{tomcatlibdir}/common/lib/naming-resources.jar plugins/org.eclipse.tomcat/naming-resources.jar +ln -s %{tomcatlibdir}/server/lib/servlets-common.jar plugins/org.eclipse.tomcat/servlets-common.jar +ln -s %{tomcatlibdir}/server/lib/servlets-default.jar plugins/org.eclipse.tomcat/servlets-default.jar +ln -s %{tomcatlibdir}/server/lib/servlets-invoker.jar plugins/org.eclipse.tomcat/servlets-invoker.jar +ln -s %{tomcatlibdir}/server/lib/tomcat-coyote.jar plugins/org.eclipse.tomcat/tomcat-coyote.jar +ln -s %{tomcatlibdir}/server/lib/tomcat-http11.jar plugins/org.eclipse.tomcat/tomcat-http11.jar +ln -s %{tomcatlibdir}/server/lib/tomcat-util.jar plugins/org.eclipse.tomcat/tomcat-util.jar +build-jar-repository -s -p plugins/org.eclipse.tomcat/lib jakarta-commons-beanutils +build-jar-repository -s -p plugins/org.eclipse.tomcat/lib jakarta-commons-collections +build-jar-repository -s -p plugins/org.eclipse.tomcat/lib jakarta-commons-dbcp +build-jar-repository -s -p plugins/org.eclipse.tomcat/lib jakarta-commons-digester +build-jar-repository -s -p plugins/org.eclipse.tomcat/lib jakarta-commons-digester-rss +build-jar-repository -s -p plugins/org.eclipse.tomcat/lib jakarta-commons-el +build-jar-repository -s -p plugins/org.eclipse.tomcat/lib jakarta-commons-fileupload +build-jar-repository -s -p plugins/org.eclipse.tomcat/lib jakarta-commons-launcher +build-jar-repository -s -p plugins/org.eclipse.tomcat/lib jakarta-commons-logging +build-jar-repository -s -p plugins/org.eclipse.tomcat/lib jakarta-commons-modeler +build-jar-repository -s -p plugins/org.eclipse.tomcat/lib jakarta-commons-pool +build-jar-repository -s -p plugins/org.eclipse.tomcat/lib jspapi +build-jar-repository -s -p plugins/org.eclipse.tomcat/lib regexp +build-jar-repository -s -p plugins/org.eclipse.tomcat/lib servletapi5 ## END TOMCAT ## -rm plugins/org.junit/junit.jar -ln -s %{_javadir}/junit.jar plugins/org.junit/junit.jar +build-jar-repository -s -p plugins/org.junit junit pushd plugins/org.eclipse.swt/Eclipse\ SWT\ PI/gtk/library # /usr/lib -> /usr/lib64 @@ -645,7 +629,7 @@ popd find plugins -name \*.xml -exec sed --in-place "s/\(\)/<\!-- \1 -->/" "{}" \; %endif -# nasty hack to get suppport for pcc64 and s390(x) +# nasty hack to get suppport for ppc64 and s390(x) # move all of the ia64 directories to ppc64 or s390(x) dirs and replace the ia64 # strings with ppc64 or s390(x) %ifarch ppc64 s390 s390x # there is only partial support for ppc64 in 3.2 so we have to remove this @@ -1060,52 +1044,50 @@ ln -sf %{_javadir}/lucene.jar plugins/org.apache.lucene_*/lucene-1.4.3.jar #rm plugins/org.eclipse.team.cvs.ssh2_*/jsch-0.1.18.jar #ln -s %{_javadir}/jsch.jar plugins/org.eclipse.team.cvs.ssh2_*/jsch-0.1.18.jar ## BEGIN TOMCAT ## -#rm plugins/org.eclipse.tomcat_*/commons-beanutils.jar -#rm plugins/org.eclipse.tomcat_*/commons-collections.jar -#rm plugins/org.eclipse.tomcat_*/commons-digester.jar -#rm plugins/org.eclipse.tomcat_*/commons-logging-api.jar -#rm plugins/org.eclipse.tomcat_*/commons-modeler.jar -#rm plugins/org.eclipse.tomcat_*/jakarta-regexp-1.3.jar -#rm plugins/org.eclipse.tomcat_*/servlet.jar -#rm plugins/org.eclipse.tomcat_*/servlets-manager.jar -#rm plugins/org.eclipse.tomcat_*/naming-common.jar -#rm plugins/org.eclipse.tomcat_*/servlets-common.jar -#rm plugins/org.eclipse.tomcat_*/tomcat-http11.jar -#ln -s %{tomcatsharedir}/bin/bootstrap.jar plugins/org.eclipse.tomcat_*/bootstrap.jar -#ln -s %{tomcatlibdir}/server/lib/catalina.jar plugins/org.eclipse.tomcat_*/catalina.jar -#ln -s %{tomcatlibdir}/server/lib/catalina-optional.jar plugins/org.eclipse.tomcat_*/catalina-optional.jar -#ln -s %{_javadir}/jakarta-commons-beanutils.jar plugins/org.eclipse.tomcat_*/jakarta-commons-beanutils.jar -#ln -s %{_javadir}/jakarta-commons-collections.jar plugins/org.eclipse.tomcat_*/jakarta-commons-collections.jar -#ln -s %{_javadir}/jakarta-commons-dbcp.jar plugins/org.eclipse.tomcat_*/jakarta-commons-dbcp.jar -#ln -s %{_javadir}/jakarta-commons-digester.jar plugins/org.eclipse.tomcat_*/jakarta-commons-digester.jar -#ln -s %{_javadir}/jakarta-commons-digester-rss.jar plugins/org.eclipse.tomcat_*/jakarta-commons-digester-rss.jar -#ln -s %{_javadir}/jakarta-commons-el.jar plugins/org.eclipse.tomcat_*/jakarta-commons-el.jar -#ln -s %{_javadir}/jakarta-commons-fileupload.jar plugins/org.eclipse.tomcat_*/jakarta-commons-fileupload.jar -#ln -s %{_javadir}/jakarta-commons-launcher.jar plugins/org.eclipse.tomcat_*/jakarta-commons-launcher.jar -#ln -s %{_javadir}/jakarta-commons-logging.jar plugins/org.eclipse.tomcat_*/jakarta-commons-logging.jar -#ln -s %{_javadir}/jakarta-commons-modeler.jar plugins/org.eclipse.tomcat_*/jakarta-commons-modeler.jar -#ln -s %{_javadir}/jakarta-commons-pool.jar plugins/org.eclipse.tomcat_*/jakarta-commons-pool.jar -#ln -s %{_javadir}/jasper5-compiler.jar plugins/org.eclipse.tomcat_*/jasper-compiler.jar -#ln -s %{_javadir}/jasper5-runtime.jar plugins/org.eclipse.tomcat_*/jasper-runtime.jar -#ln -s %{_javadir}/jspapi.jar plugins/org.eclipse.tomcat_*/jspapi.jar -#ln -s %{_javadir}/mx4j/mx4j.jar plugins/org.eclipse.tomcat_*/mx4j.jar -#ln -s %{_javadir}/mx4j/mx4j-impl.jar plugins/org.eclipse.tomcat_*/mx4j-impl.jar -#ln -s %{_javadir}/mx4j/mx4j-jmx.jar plugins/org.eclipse.tomcat_*/mx4j-jmx.jar -#ln -s %{tomcatlibdir}/common/lib/naming-common.jar plugins/org.eclipse.tomcat_*/naming-common.jar -#ln -s %{tomcatlibdir}/common/lib/naming-factory.jar plugins/org.eclipse.tomcat_*/naming-factory.jar -#ln -s %{tomcatlibdir}/common/lib/naming-resources.jar plugins/org.eclipse.tomcat_*/naming-resources.jar -#ln -s %{_javadir}/regexp.jar plugins/org.eclipse.tomcat_*/regexp.jar -#ln -s %{_javadir}/servletapi5.jar plugins/org.eclipse.tomcat_*/servletapi5.jar -#ln -s %{tomcatlibdir}/server/lib/servlets-common.jar plugins/org.eclipse.tomcat_*/servlets-common.jar -#ln -s %{tomcatlibdir}/server/lib/servlets-default.jar plugins/org.eclipse.tomcat_*/servlets-default.jar -#ln -s %{tomcatlibdir}/server/lib/servlets-invoker.jar plugins/org.eclipse.tomcat_*/servlets-invoker.jar -#ln -s %{tomcatlibdir}/server/lib/tomcat-coyote.jar plugins/org.eclipse.tomcat_*/tomcat-coyote.jar -#ln -s %{tomcatlibdir}/server/lib/tomcat-http11.jar plugins/org.eclipse.tomcat_*/tomcat-http11.jar -#ln -s %{tomcatlibdir}/server/lib/tomcat-util.jar plugins/org.eclipse.tomcat_*/tomcat-util.jar +rm plugins/org.eclipse.tomcat_*/commons-beanutils.jar +rm plugins/org.eclipse.tomcat_*/commons-collections.jar +rm plugins/org.eclipse.tomcat_*/commons-digester.jar +rm plugins/org.eclipse.tomcat_*/commons-logging-api.jar +rm plugins/org.eclipse.tomcat_*/commons-modeler.jar +rm plugins/org.eclipse.tomcat_*/jakarta-regexp-1.3.jar +rm plugins/org.eclipse.tomcat_*/servlet.jar +rm plugins/org.eclipse.tomcat_*/servlets-manager.jar +rm plugins/org.eclipse.tomcat_*/naming-common.jar +rm plugins/org.eclipse.tomcat_*/servlets-common.jar +rm plugins/org.eclipse.tomcat_*/tomcat-http11.jar +ln -s %{tomcatsharedir}/bin/bootstrap.jar plugins/org.eclipse.tomcat_*/bootstrap.jar +ln -s %{tomcatlibdir}/server/lib/catalina.jar plugins/org.eclipse.tomcat_*/catalina.jar +ln -s %{tomcatlibdir}/server/lib/catalina-optional.jar plugins/org.eclipse.tomcat_*/catalina-optional.jar +ln -s %{_javadir}/jasper5-compiler.jar plugins/org.eclipse.tomcat_*/jasper-compiler.jar +ln -s %{_javadir}/jasper5-runtime.jar plugins/org.eclipse.tomcat_*/jasper-runtime.jar +ln -s %{_javadir}/mx4j/mx4j.jar plugins/org.eclipse.tomcat_*/mx4j.jar +ln -s %{_javadir}/mx4j/mx4j-impl.jar plugins/org.eclipse.tomcat_*/mx4j-impl.jar +ln -s %{_javadir}/mx4j/mx4j-jmx.jar plugins/org.eclipse.tomcat_*/mx4j-jmx.jar +ln -s %{tomcatlibdir}/common/lib/naming-common.jar plugins/org.eclipse.tomcat_*/naming-common.jar +ln -s %{tomcatlibdir}/common/lib/naming-factory.jar plugins/org.eclipse.tomcat_*/naming-factory.jar +ln -s %{tomcatlibdir}/common/lib/naming-resources.jar plugins/org.eclipse.tomcat_*/naming-resources.jar +ln -s %{tomcatlibdir}/server/lib/servlets-common.jar plugins/org.eclipse.tomcat_*/servlets-common.jar +ln -s %{tomcatlibdir}/server/lib/servlets-default.jar plugins/org.eclipse.tomcat_*/servlets-default.jar +ln -s %{tomcatlibdir}/server/lib/servlets-invoker.jar plugins/org.eclipse.tomcat_*/servlets-invoker.jar +ln -s %{tomcatlibdir}/server/lib/tomcat-coyote.jar plugins/org.eclipse.tomcat_*/tomcat-coyote.jar +ln -s %{tomcatlibdir}/server/lib/tomcat-http11.jar plugins/org.eclipse.tomcat_*/tomcat-http11.jar +ln -s %{tomcatlibdir}/server/lib/tomcat-util.jar plugins/org.eclipse.tomcat_*/tomcat-util.jar +build-jar-repository -s -p plugins/org.eclipse.tomcat_*/lib jakarta-commons-beanutils +build-jar-repository -s -p plugins/org.eclipse.tomcat_*/lib jakarta-commons-collections +build-jar-repository -s -p plugins/org.eclipse.tomcat_*/lib jakarta-commons-dbcp +build-jar-repository -s -p plugins/org.eclipse.tomcat_*/lib jakarta-commons-digester +build-jar-repository -s -p plugins/org.eclipse.tomcat_*/lib jakarta-commons-digester-rss +build-jar-repository -s -p plugins/org.eclipse.tomcat_*/lib jakarta-commons-el +build-jar-repository -s -p plugins/org.eclipse.tomcat_*/lib jakarta-commons-fileupload +build-jar-repository -s -p plugins/org.eclipse.tomcat_*/lib jakarta-commons-launcher +build-jar-repository -s -p plugins/org.eclipse.tomcat_*/lib jakarta-commons-logging +build-jar-repository -s -p plugins/org.eclipse.tomcat_*/lib jakarta-commons-modeler +build-jar-repository -s -p plugins/org.eclipse.tomcat_*/lib jakarta-commons-pool +build-jar-repository -s -p plugins/org.eclipse.tomcat_*/lib jspapi +build-jar-repository -s -p plugins/org.eclipse.tomcat_*/lib regexp +build-jar-repository -s -p plugins/org.eclipse.tomcat_*/lib servletapi5 ## END TOMCAT ## -# FIXME rm -f in ln -#rm plugins/org.junit_*/junit.jar -ln -sf %{_javadir}/junit.jar plugins/org.junit_*/junit.jar +build-jar-repository -s -p plugins/org.junit_* junit # Symlink org.eclipse.jdt.core_%{eclipse_majmin}.%{eclipse_micro}.jar in # %{_datadir}/java/eclipse-ecj.jar for java-1.4.2-gcj-compat's "javac" @@ -1139,7 +1121,7 @@ popd %if %{gcj_support} %ifarch ia64 # FIXME: auto get version number; tweak aot-compile-rpm to fix this -aot-compile-rpm --exclude %{_datadir}/%{name}/plugins/org.eclipse.team.cvs.core_3.2.0.I200606011710.jar +aot-compile-rpm --exclude %{_datadir}/%{name}/plugins/org.eclipse.team.cvs.core_3.2.0.M20060628.jar %else aot-compile-rpm %endif @@ -1630,6 +1612,11 @@ fi %endif %changelog +* Tue Jul 04 2006 Andrew Overholt 3.2.0-1jpp_1fc +- 3.2.0. +- Remove Provides: eclipse-sdk from eclipse-platform. +- Use build-jar-repository where appropriate. + * Tue Jun 13 2006 Ben Konrath 3.2.0-0jpp_0fc.3.2RC7.7 - Rename -devel packages to -sdk to match upstream names. - Add Provides eclipse-sdk to platform-sdk. diff --git a/sources b/sources index 8134877..3b16c1a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -9fa62b56c209713a32296f3ac65cf1d0 eclipse-sourceBuild-srcIncluded-3.2RC7.zip -f7837f724789b30537d2afe1b8b77161 eclipse-fedora-splash-3.2rc7.png +67b41802092d4b2f779fb756dcaec85c eclipse-sourceBuild-srcIncluded-3.2.zip +5839c46d1080ddd08d3de669e2091189 eclipse-fedora-splash-3.2.png