Use commons-lang for string replacement, util:replace does not work with maven 1.0.2
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@354128 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -569,9 +569,9 @@
|
||||
<goal name="xdoc:init"
|
||||
prereqs="xdoc:init-i18n"
|
||||
description="Generates the directory structure required for xdocs">
|
||||
|
||||
|
||||
<echo message="Generates the directory structure required for xdocs"/>
|
||||
|
||||
|
||||
<mkdir dir="${maven.gen.docs}"/>
|
||||
<mkdir dir="${maven.docs.dest}"/>
|
||||
|
||||
@@ -592,6 +592,9 @@
|
||||
<mkdir dir="${maven.gen.docs}/${locale}"/>
|
||||
</j:if>
|
||||
</j:forEach>
|
||||
|
||||
<j:useBean var="stringUtils" class="org.apache.commons.lang.StringUtils"/>
|
||||
|
||||
</goal>
|
||||
|
||||
<goal name="xdoc:init-i18n"
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<project>
|
||||
<project xmlns="http://maven.apache.org/POM/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/3.0.0 http://maven.apache.org/maven-v3_0_0.xsd">
|
||||
<extend>../plugin-parent/project.xml</extend>
|
||||
<pomVersion>3</pomVersion>
|
||||
<id>maven-xdoc-plugin</id>
|
||||
@@ -216,6 +217,15 @@
|
||||
<comment>This library is already loaded by maven's core. Be careful to use the same version number as in the core.</comment>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>2.0</version>
|
||||
<url>http://jakarta.apache.org/commons/lang/</url>
|
||||
<properties>
|
||||
<comment>This library is already loaded by maven's core. Be careful to use the same version number as in the core.</comment>
|
||||
</properties>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<j:if test="${link.startsWith('/')}" trim="yes">
|
||||
<j:set var="link" value="${link.substring(1)}"/>
|
||||
</j:if>
|
||||
<util:replace value="${link}" var="xml_link" old=".html" new=".xml"/>
|
||||
<j:set var="xml_link" value="${stringUtils.replace(link, '.html', '.xml')}"/>
|
||||
<util:available file="${maven.docs.src}/${xml_link}">
|
||||
<util:file var="xmlfile" name="${maven.docs.src}/${xml_link}"/>
|
||||
<x:parse var="inputdoc" xml="${xmlfile}"/>
|
||||
|
||||
Reference in New Issue
Block a user