Replace util:replace (doesn't work with Maven 1.0) by comons.lang.StringUtils' replace
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@378094 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
ab3eda60d2
commit
8f37844658
1 file changed
+5
-2
+5
-2
@@ -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}"/>
|
||||
|
||||
Reference in new issue
Block a user