You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ah...@apache.org on 2005/09/12 17:50:21 UTC

svn commit: r280358 - /maven/maven-1/plugins/trunk/plugin/plugin.jelly

Author: aheritier
Date: Mon Sep 12 08:50:17 2005
New Revision: 280358

URL: http://svn.apache.org/viewcvs?rev=280358&view=rev
Log:
Replace String comparison by Integer comparison !! It's why I added this tag ;-)

Modified:
    maven/maven-1/plugins/trunk/plugin/plugin.jelly

Modified: maven/maven-1/plugins/trunk/plugin/plugin.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/plugin/plugin.jelly?rev=280358&r1=280357&r2=280358&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/plugin/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/plugin/plugin.jelly Mon Sep 12 08:50:17 2005
@@ -398,17 +398,23 @@
             <j:break/>
           </j:if>
           <j:set var="numberToHave" value="${minReleaseToHaveTokensIter.next()}"/>
+          <j:invokeStatic  var="numberInstalledInteger" className="java.lang.Integer" method="valueOf">
+            <j:arg value="${numberInstalled}"/>
+          </j:invokeStatic>
+          <j:invokeStatic  var="numberToHaveInteger" className="java.lang.Integer" method="valueOf">
+            <j:arg value="${numberToHave}"/>
+          </j:invokeStatic>
           <j:choose>
-              <j:when test="${numberInstalled.compareTo(numberToHave) lt 0}">
-                <!-- ${numberInstalled} is less than ${numberToHave} => fail -->
+              <j:when test="${numberInstalledInteger.compareTo(numberToHaveInteger) lt 0}">
+                <!--<echo>${numberInstalledInteger} is less than ${numberToHaveInteger}</echo>-->
                 <j:set var="testFailed" value="true"/>
                 <j:break/>
               </j:when>
-              <j:when test="${numberInstalled.compareTo(numberToHave) eq 0}">
-              <!-- ${numberInstalled} is equal than ${numberToHave} => continue to test -->
+              <j:when test="${numberInstalledInteger.compareTo(numberToHaveInteger) eq 0}">
+              <!--<echo>${numberInstalledInteger} is equal than ${numberToHaveInteger}</echo>-->
               </j:when>
-              <j:when test="${numberInstalled.compareTo(numberToHave) gt 0}">
-              <!-- ${numberInstalled} is greater than ${numberToHave} => good -->
+              <j:when test="${numberInstalledInteger.compareTo(numberToHaveInteger) gt 0}">
+              <!--<echo>${numberInstalledInteger} is greater than ${numberToHaveInteger}</echo>-->
                 <j:break/>
               </j:when>              
           </j:choose>
@@ -416,12 +422,12 @@
       </j:when>
       <j:otherwise>
         <j:set var="testFailed" value="true"/>
-      </j:otherwise>
+      </j:otherwise>    
     </j:choose>
 
     <j:if test="${testFailed}">
       <ant:fail>
-      - BE CAREFUL
+      -
       =======================================================================================
       Must have ${pluginToTest} plugin v${minReleaseToHave} installed to use this version of the plugin.
       Try: maven plugin:download -DgroupId=maven -DartifactId=${pluginToTest} -Dversion=${minReleaseToHave}



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org