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 2004/10/26 00:45:53 UTC
cvs commit: maven-plugins/xdoc/xdocs changes.xml properties.xml
aheritier 2004/10/25 15:45:53
Modified: xdoc plugin.jelly plugin.properties
xdoc/src/plugin-test/test02 maven.xml
xdoc/xdocs changes.xml properties.xml
Added: xdoc/src/plugin-test/test02 project.properties
xdoc/src/plugin-test/test02/xdocs myfile.export.xml
xml_copy_only.xml
Log:
MPXDOC-123 :
A new property is added : maven.xdoc.xml.copy
A comma separated list of patterns to specify xml files to copy from ${maven.docs.src} to ${maven.docs.dest} without to perform a transformation to HTML.
The default value is empty (no xml files are copied).
Revision Changes Path
1.62 +32 -0 maven-plugins/xdoc/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven-plugins/xdoc/plugin.jelly,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- plugin.jelly 3 Jul 2004 02:02:30 -0000 1.61
+++ plugin.jelly 25 Oct 2004 22:45:53 -0000 1.62
@@ -280,6 +280,9 @@
<j:new var="dirMapper" className="org.apache.maven.util.CaseInsensitiveGlobPatternMapper"/>
<j:setProperties object="${dirMapper}" from="${fromDirPattern}" to="${toDirPattern}"/>
+ <maven:pluginVar var="maven_xdoc_xml_copy_pattern"
+ plugin='maven-xdoc-plugin' property='maven.xdoc.xml.copy' />
+
<fileScanner var="docFiles">
<fileset dir="${srcdir}">
<patternset>
@@ -287,6 +290,12 @@
<exclude name="**/template.xml"/>
<exclude name="**/navigation.xml"/>
<exclude name="changes.xml"/>
+ <j:if test="${maven_xdoc_xml_copy_pattern!=null and !maven_xdoc_xml_copy_pattern.equals('')}">
+ <util:tokenize var="xmlPatterns" delim=",">${maven_xdoc_xml_copy_pattern}</util:tokenize>
+ <j:forEach var="xmlPattern" items="${xmlPatterns}">
+ <exclude name="${xmlPattern}"/>
+ </j:forEach>
+ </j:if>
<include name="**/*.xml"/>
</patternset>
</fileset>
@@ -597,6 +606,10 @@
<j:if test="${maven.docs.src.available}">
+ <log:info>
+ Copying user supplied resources.
+ </log:info>
+
<!-- Copy user supplied resources -->
<copy todir="${maven.docs.dest}" filtering="no">
<fileset dir="${maven.docs.src}">
@@ -623,6 +636,25 @@
</util:available>
</j:if>
+
+ <maven:pluginVar var="maven_xdoc_xml_copy_pattern"
+ plugin='maven-xdoc-plugin' property='maven.xdoc.xml.copy' />
+
+ <j:if test="${maven_xdoc_xml_copy_pattern!=null and !maven_xdoc_xml_copy_pattern.equals('')}">
+ <util:tokenize var="xmlPatterns" delim=",">${maven_xdoc_xml_copy_pattern}</util:tokenize>
+ <log:info>
+ Copying user supplied xml files.
+ </log:info>
+ <!-- Copy xml files -->
+ <copy todir="${maven.docs.dest}" filtering="no">
+ <fileset dir="${maven.docs.src}">
+ <j:forEach var="xmlPattern" items="${xmlPatterns}">
+ <include name="${xmlPattern}"/>
+ </j:forEach>
+ </fileset>
+ </copy>
+
+ </j:if>
</goal>
<!-- ================================================================== -->
1.22 +3 -0 maven-plugins/xdoc/plugin.properties
Index: plugin.properties
===================================================================
RCS file: /home/cvs/maven-plugins/xdoc/plugin.properties,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- plugin.properties 13 Jul 2004 12:18:59 -0000 1.21
+++ plugin.properties 25 Oct 2004 22:45:53 -0000 1.22
@@ -80,3 +80,6 @@
project-info.xml,\
team-list.xml,\
downloads.jelly
+
+# List of xml files (or patterns) that are copied but not transformed
+#maven.xdoc.xml.copy=
\ No newline at end of file
1.2 +5 -0 maven-plugins/xdoc/src/plugin-test/test02/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/cvs/maven-plugins/xdoc/src/plugin-test/test02/maven.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- maven.xml 16 Sep 2004 23:18:59 -0000 1.1
+++ maven.xml 25 Oct 2004 22:45:53 -0000 1.2
@@ -25,5 +25,10 @@
<assert:assertEquals expected="0" value="${countLogo.intValue().toString()}" msg="Logo not found."/>
<x:set var="countUrl" select="count($linkcheckDoc/linkcheck/file/result[contains(child::target,'project-info.html')][contains(child::status,'NOT FOUND')])"/>
<assert:assertEquals expected="0" value="${countUrl.intValue().toString()}" msg="Url not found."/>
+ <!-- Test -->
+ <assert:assertFileExists file="${maven.docs.dest}/xml_copy_only.xml"/>
+ <assert:assertFileNotFound file="${maven.docs.dest}/xml_copy_only.html"/>
+ <assert:assertFileExists file="${maven.docs.dest}/myfile.export.xml"/>
+ <assert:assertFileNotFound file="${maven.docs.dest}/myfile.export.html"/>
</goal>
</project>
1.1 maven-plugins/xdoc/src/plugin-test/test02/project.properties
Index: project.properties
===================================================================
# -------------------------------------------------------------------
# Copyright 2001-2004 The Apache Software Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -------------------------------------------------------------------
# List of xml files (or patterns) that are copied but not transformed
maven.xdoc.xml.copy=**/*copy_only.xml,**/*.export.xml
1.1 maven-plugins/xdoc/src/plugin-test/test02/xdocs/myfile.export.xml
Index: myfile.export.xml
===================================================================
<?xml version="1.0"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<document>
<properties>
<title>Xdoc test Document</title>
</properties>
<body>
<section name="test jslToSite tag">
<p>empty document</p>
<p>
This document is generated separately from other xdoc documents
but should retain the site stylesheet and navigation.
</p>
</section>
</body>
</document>
1.1 maven-plugins/xdoc/src/plugin-test/test02/xdocs/xml_copy_only.xml
Index: xml_copy_only.xml
===================================================================
<?xml version="1.0"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<document>
<properties>
<title>Xdoc test Document</title>
</properties>
<body>
<section name="test jslToSite tag">
<p>empty document</p>
<p>
This document is generated separately from other xdoc documents
but should retain the site stylesheet and navigation.
</p>
</section>
</body>
</document>
1.66 +1 -0 maven-plugins/xdoc/xdocs/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/maven-plugins/xdoc/xdocs/changes.xml,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- changes.xml 21 Sep 2004 13:47:53 -0000 1.65
+++ changes.xml 25 Oct 2004 22:45:53 -0000 1.66
@@ -27,6 +27,7 @@
</properties>
<body>
<release version="1.9-SNAPSHOT" date="in CVS">
+ <action dev="aheritier" type="add" issue="MPXDOC-123">New property (maven.xdoc.xml.copy) to copy only and not transform some xml files provided in the ${maven.docs.src} directory.</action>
<action dev="brett" type="update">Make compatible with Maven 1.1</action>
<action dev="aheritier" type="fix" issue="MPXDOC-117" due-to="Dennis Lundberg">Show version if maven.xdoc.date=right</action>
<action dev="aheritier" type="fix" issue="MPXDOC-115" due-to="Brent Worden">Allow header images and links to use relative paths</action>
1.16 +10 -0 maven-plugins/xdoc/xdocs/properties.xml
Index: properties.xml
===================================================================
RCS file: /home/cvs/maven-plugins/xdoc/xdocs/properties.xml,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- properties.xml 22 Aug 2004 14:24:26 -0000 1.15
+++ properties.xml 25 Oct 2004 22:45:53 -0000 1.16
@@ -61,6 +61,16 @@
<code>${maven.build.dir}/generated-xdocs</code>.
</td>
</tr>
+ <tr>
+ <td>maven.xdoc.xml.copy</td>
+ <td>Yes</td>
+ <td>
+ A comma separated list of patterns to specify xml files to copy
+ from ${maven.docs.src} to ${maven.docs.dest} without
+ to perform a transformation to HTML.
+ The default value is empty (no xml files are copied).
+ </td>
+ </tr>
</table>
</section>
<section name="Localization Properties">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org