geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tki...@apache.org
Subject svn commit: r685303 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java
Date Tue, 12 Aug 2008 20:32:26 GMT
Author: tkirby
Date: Tue Aug 12 13:32:26 2008
New Revision: 685303

URL: http://svn.apache.org/viewvc?rev=685303&view=rev
Log:
GERONIMODEVTOOLS-332 GEP should be made to work with the Trunk version of the Geronimo Server
but also report errors on version mismatch of released servers.

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java?rev=685303&r1=685302&r2=685303&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoRuntimeDelegate.java
Tue Aug 12 13:32:26 2008
@@ -125,12 +125,19 @@
 
         if (!detectedVersion.startsWith(getRuntime().getRuntimeType()
 				.getVersion())) {
+        	String runtimeVersion = getRuntime().getRuntimeType().getVersion();
 			String message = NLS.bind(Messages.incorrectVersion,
 					new String[] { getRuntime().getName(),
-							getRuntime().getRuntimeType().getVersion(),
+					        runtimeVersion,
 							detectedVersion });
-			return new Status(IStatus.WARNING, Activator.PLUGIN_ID,
-					INCORRECT_VERSION, message, null);
+            // GD332 allow version > if it's a SNAPSHOT
+            int severity = IStatus.ERROR;
+            if (detectedVersion.endsWith("-SNAPSHOT")
+                    && detectedVersion.compareTo(runtimeVersion) >= 0) {
+                severity = IStatus.WARNING;
+            }
+            return new Status(severity, Activator.PLUGIN_ID, INCORRECT_VERSION,
+                    message, null);
 		}
 
         return Status.OK_STATUS;



Mime
View raw message