You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by mc...@apache.org on 2008/06/05 20:11:01 UTC
svn commit: r663690 - in /geronimo/devtools/eclipse-plugin/trunk:
assembly/src/main/assembly/
features/org.apache.geronimo.installableruntime.jetty.feature/
features/org.apache.geronimo.installableruntime.tomcat.feature/
plugins/org.apache.geronimo.st....
Author: mcconne
Date: Thu Jun 5 11:11:00 2008
New Revision: 663690
URL: http://svn.apache.org/viewvc?rev=663690&view=rev
Log:
GERONIMODEVTOOLS-351 Applied patch to fix problems with download and install -- Thanks to Ted Kirby for this regular expression patch !!
Modified:
geronimo/devtools/eclipse-plugin/trunk/assembly/src/main/assembly/site.xml
geronimo/devtools/eclipse-plugin/trunk/features/org.apache.geronimo.installableruntime.jetty.feature/feature.xml
geronimo/devtools/eclipse-plugin/trunk/features/org.apache.geronimo.installableruntime.tomcat.feature/feature.xml
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoRuntimeWizardFragment.java
geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/plugin.xml
Modified: geronimo/devtools/eclipse-plugin/trunk/assembly/src/main/assembly/site.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/assembly/src/main/assembly/site.xml?rev=663690&r1=663689&r2=663690&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/assembly/src/main/assembly/site.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/assembly/src/main/assembly/site.xml Thu Jun 5 11:11:00 2008
@@ -56,4 +56,10 @@
<archive path="features/org.apache.geronimo.installableruntime.tomcat.feature_2.1.1/geronimo-tomcat6-javaee5-2.1.1.zip"
url="runtimes/geronimo-tomcat6-javaee5-2.1.1-bin.zip"/>
+ <archive path="features/org.apache.geronimo.installableruntime.jetty.feature_2.1.1/geronimo-jetty6-jee5-2.0.2.zip"
+ url="runtimes/geronimo-jetty6-jee5-2.0.2-bin.zip"/>
+
+ <archive path="features/org.apache.geronimo.installableruntime.tomcat.feature_2.1.1/geronimo-tomcat6-jee5-2.0.2.zip"
+ url="runtimes/geronimo-tomcat6-jee5-2.0.2-bin.zip"/>
+
</site>
Modified: geronimo/devtools/eclipse-plugin/trunk/features/org.apache.geronimo.installableruntime.jetty.feature/feature.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/features/org.apache.geronimo.installableruntime.jetty.feature/feature.xml?rev=663690&r1=663689&r2=663690&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/features/org.apache.geronimo.installableruntime.jetty.feature/feature.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/features/org.apache.geronimo.installableruntime.jetty.feature/feature.xml Thu Jun 5 11:11:00 2008
@@ -41,6 +41,11 @@
id="geronimo-jetty6-javaee5-2.1.1.zip"
download-size="0"
install-size="0"/>
+
+ <data
+ id="geronimo-jetty6-jee5-2.0.2.zip"
+ download-size="0"
+ install-size="0"/>
<install-handler handler="org.eclipse.update.core.DefaultInstallHandler"/>
Modified: geronimo/devtools/eclipse-plugin/trunk/features/org.apache.geronimo.installableruntime.tomcat.feature/feature.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/features/org.apache.geronimo.installableruntime.tomcat.feature/feature.xml?rev=663690&r1=663689&r2=663690&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/features/org.apache.geronimo.installableruntime.tomcat.feature/feature.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/features/org.apache.geronimo.installableruntime.tomcat.feature/feature.xml Thu Jun 5 11:11:00 2008
@@ -41,7 +41,12 @@
id="geronimo-tomcat6-javaee5-2.1.1.zip"
download-size="0"
install-size="0"/>
-
+
+ <data
+ id="geronimo-tomcat6-jee5-2.0.2.zip"
+ download-size="0"
+ install-size="0"/>
+
<install-handler handler="org.eclipse.update.core.DefaultInstallHandler"/>
</feature>
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoRuntimeWizardFragment.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoRuntimeWizardFragment.java?rev=663690&r1=663689&r2=663690&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoRuntimeWizardFragment.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/internal/GeronimoRuntimeWizardFragment.java Thu Jun 5 11:11:00 2008
@@ -20,6 +20,8 @@
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.apache.geronimo.st.core.GeronimoRuntimeDelegate;
import org.apache.geronimo.st.ui.Activator;
@@ -75,6 +77,10 @@
* @version $Rev$ $Date$
*/
public class GeronimoRuntimeWizardFragment extends WizardFragment {
+
+ // serverName-N.N or serverName-N.N.N
+ public static final Pattern SERVER_NAME_VERSION_PATTERN = Pattern
+ .compile("(.*-)((\\d+\\.\\d+)(\\.(\\d+))?)");
private GeronimoRuntimeDelegate geronimoRuntime;
@@ -229,23 +235,30 @@
return true;
}
+ /**
+ * server zips have the server name in them as the root directory.
+ * We need to add that to the install directory.
+ * The server name comes from the installableruntime definitions in org.apache.gernoimo.st.v2{0.1}.core/plugin.xml.
+ * A main method below is used to test this code in development.
+ * @param installPath
+ */
void updateInstallDir(IPath installPath) {
- InstallableRuntime installable = (InstallableRuntime) (tomcat.getSelection() ? gWithTomcat
- : gWithJetty);
- String version = installable.getFeatureVersion();
- if ( version.startsWith("2.1") ) {
- installPath = installPath.append("geronimo-" + (tomcat.getSelection() ? "tomcat6" : "jetty6") + "-javaee5-" + "2.1.1" );
- }
- else {
- if ( version.startsWith("2.0") ) {
- installPath = installPath.append("geronimo-" + (tomcat.getSelection() ? "tomcat6" : "jetty6") + "-jee5-" + version);
- }
- else {
- installPath = installPath.append("geronimo-" + (tomcat.getSelection() ? "tomcat6" : "jetty6") + "-j2ee-" + version);
- }
- }
- installDir.setText(installPath.toOSString());
- }
+ InstallableRuntime installable = (InstallableRuntime) (tomcat
+ .getSelection() ? gWithTomcat : gWithJetty);
+ String path = installable.getPath();
+ Matcher matcher = SERVER_NAME_VERSION_PATTERN.matcher(path);
+ if (matcher.find()) {
+ String serverName = matcher.group(1);
+ String serverVersion = matcher.group(2);
+ installPath = installPath.append(serverName
+ + serverVersion);
+ } else {
+ Trace.trace(Trace.SEVERE, "No version found in path = "
+ + path);
+ installPath = installPath.append(path);
+ }
+ installDir.setText(installPath.toOSString());
+ }
});
}
else {
@@ -542,4 +555,26 @@
protected void createChildFragments(List list) {
list.add(new GeronimoRuntimeSourceWizardFragment());
}
+
+ /**
+ * Code for testing server name determination code in the updateInstallDir(IPath) method of addInstallableRuntimeSection.
+ * @param args
+ */
+ public static void main(String[] args) {
+ Pattern SERVER_NAME_VERSION_PATTERN = Pattern
+ .compile("(.*-)((\\d+\\.\\d+)(\\.(\\d+))?)");
+ for (String path : args) {
+ StringBuffer installPath = new StringBuffer();
+ Matcher matcher = SERVER_NAME_VERSION_PATTERN.matcher(path);
+ if (matcher.find()) {
+ String serverName = matcher.group(1);
+ String serverVersion = matcher.group(2);
+ installPath = installPath.append(serverName + serverVersion);
+ System.out.println("path = " + path + ", serverVersion = "
+ + serverVersion + ", installPath = " + installPath);
+ } else {
+ System.out.println("No version found in path = " + path);
+ }
+ }
+ }
}
\ No newline at end of file
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/plugin.xml?rev=663690&r1=663689&r2=663690&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/plugin.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v20.core/plugin.xml Thu Jun 5 11:11:00 2008
@@ -61,16 +61,16 @@
-->
<extension point="org.eclipse.wst.server.core.installableRuntimes">
<installableRuntime id="org.apache.geronimo.runtime.tomcat.20"
- featureVersion="2.0.1"
+ featureVersion="2.1.1"
featureId="org.apache.geronimo.installableruntime.tomcat.feature"
featureSite="http://people.apache.org/~mcconne/releases/2.1.1/RC1/staging_site/"
- path="geronimo-tomcat6-jee5-2.0.1.zip">
+ path="geronimo-tomcat6-jee5-2.0.2.zip">
</installableRuntime>
<installableRuntime id="org.apache.geronimo.runtime.jetty.20"
- featureVersion="2.0.1"
+ featureVersion="2.1.1"
featureId="org.apache.geronimo.installableruntime.jetty.feature"
featureSite="http://people.apache.org/~mcconne/releases/2.1.1/RC1/staging_site/"
- path="geronimo-jetty6-jee5-2.0.1.zip">
+ path="geronimo-jetty6-jee5-2.0.2.zip">
</installableRuntime>
</extension>