You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by lt...@apache.org on 2005/12/06 08:10:50 UTC

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

Author: ltheussl
Date: Mon Dec  5 23:10:47 2005
New Revision: 354341

URL: http://svn.apache.org/viewcvs?rev=354341&view=rev
Log:
substring() doesn't work either with maven1.0

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=354341&r1=354340&r2=354341&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/plugin/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/plugin/plugin.jelly Mon Dec  5 23:10:47 2005
@@ -119,7 +119,10 @@
     <!-- Remove SNAPSHOT -->
     <j:choose>
       <j:when test="${minRelease.endsWith('-SNAPSHOT')}">
-        <j:set var="minReleaseToHave" value="${minRelease.substring(0,minRelease.length()-9)}"/>
+        <j:invokeStatic className="org.apache.commons.lang.StringUtils" method="substringBeforeLast" var="minReleaseToHave">
+            <j:arg value="${minRelease}" type="java.lang.String"/>
+            <j:arg value="-SNAPSHOT" type="java.lang.String"/>
+        </j:invokeStatic>
       </j:when>
       <j:otherwise>
         <j:set var="minReleaseToHave" value="${minRelease}"/>
@@ -136,7 +139,10 @@
         <!-- Remove SNAPSHOT -->
         <j:choose>
           <j:when test="${installedPlugin.currentVersion.endsWith('-SNAPSHOT')}">
-            <j:set var="installedRelease" value="${installedPlugin.currentVersion.substring(0,installedPlugin.currentVersion.length()-9)}"/>
+            <j:invokeStatic className="org.apache.commons.lang.StringUtils" method="substringBeforeLast" var="installedRelease">
+                <j:arg value="${installedPlugin.currentVersion}" type="java.lang.String"/>
+                <j:arg value="-SNAPSHOT" type="java.lang.String"/>
+            </j:invokeStatic>
           </j:when>
           <j:otherwise>
             <j:set var="installedRelease" value="${installedPlugin.currentVersion}"/>