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 2006/02/15 22:18:15 UTC

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

Author: ltheussl
Date: Wed Feb 15 13:18:12 2006
New Revision: 378094

URL: http://svn.apache.org/viewcvs?rev=378094&view=rev
Log:
Replace util:replace (doesn't work with Maven 1.0) by comons.lang.StringUtils' replace

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

Modified: maven/maven-1/plugins/trunk/xdoc/plugin.jelly
URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/xdoc/plugin.jelly?rev=378094&r1=378093&r2=378094&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/xdoc/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/xdoc/plugin.jelly Wed Feb 15 13:18:12 2006
@@ -835,6 +835,8 @@
     <goal name="xdoc:validate" prereqs="xdoc:navigation-validate"
         description="Validate xdocs match the schema">
 
+    <j:useBean var="stringUtils" class="org.apache.commons.lang.StringUtils"/>
+
     <available file="${maven.docs.src}" type="dir"
         property="maven.docs.src.available"/>
 
@@ -856,8 +858,9 @@
         </fileset>
       </fileScanner>
       <j:forEach var="file" items="${xmlFiles.iterator()}">
-      <util:replace var="dtdFile" old=".xml" new=".dtd" value="${file}"/>
-      <util:replace var="xsdFile" old=".xml" new=".xsd" value="${file}"/>
+      <j:invoke var="filename" on="${file}" method="getAbsolutePath"/>
+      <j:set var="dtdFile" value="${stringUtils.replace(filename, '.xml', '.dtd')}"/>
+      <j:set var="xsdFile" value="${stringUtils.replace(filename, '.xml', '.xsd')}"/>
       <j:set var="schema" value="${plugin.resources}/dtd/maven-xdoc.dtd"/>
       <util:available file="${dtdFile}">
         <j:set var="schema" value="${dtdFile}"/>