aheritier 2004/09/16 16:18:59
Modified: xdoc/src/plugin-resources site.jsl
xdoc/src/plugin-test maven.xml
xdoc/xdocs changes.xml
Added: xdoc/src/plugin-test/test02 .cvsignore maven.xml project.xml
xdoc/src/plugin-test/test02/xdocs/images
apache-maven-project.png maven.gif
xdoc/src/plugin-test/test02/xdocs/subdir testjsltosite.xml
Log:
Fix + test for MPXDOC 115
Revision Changes Path
1.62 +13 -2 maven-plugins/xdoc/src/plugin-resources/site.jsl
Index: site.jsl
===================================================================
RCS file: /home/cvs/maven-plugins/xdoc/src/plugin-resources/site.jsl,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- site.jsl 22 Aug 2004 14:24:26 -0000 1.61
+++ site.jsl 16 Sep 2004 23:18:59 -0000 1.62
@@ -97,6 +97,11 @@
<j:if test="${empty(url)}">
<j:set var="home" value="${pom.url}"/>
</j:if>
+ <!-- set home to relative or complete -->
+ <j:if test="${!home.startsWith('http://') and
!home.startsWith('https://')}">
+ <j:set var="home" value="${relativePath}${home}"/>
+ </j:if>
+
<!-- set image to relative or complete -->
<j:set var="image" value="${pom.organization.logo}"/>
<j:if test="${!image.startsWith('http://') and
!image.startsWith('https://')}">
@@ -107,6 +112,12 @@
</a>
</j:if>
+ <!-- set project to relative or complete -->
+ <j:set var="home" value="${pom.url}"/>
+ <j:if test="${!home.startsWith('http://') and
!home.startsWith('https://')}">
+ <j:set var="home" value="${relativePath}${home}"/>
+ </j:if>
+
<!-- project logo and link -->
<j:set var="logo" value="${pom.logo}"/>
<j:if test="${logo != null and logo != ''}">
@@ -116,12 +127,12 @@
<j:set var="image" value="${relativePath}${image}"/>
</j:if>
- <a href="${pom.url}" id="projectLogo">
+ <a href="${home}" id="projectLogo">
<img src="${image}" alt="${pom.name}"/>
</a>
</j:if>
<j:if test="${logo == null or logo == ''}">
- <a href="${pom.url}" id="projectLogo">
+ <a href="${home}" id="projectLogo">
<span>${pom.name}</span>
</a>
</j:if>
1.8 +3 -13 maven-plugins/xdoc/src/plugin-test/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/cvs/maven-plugins/xdoc/src/plugin-test/maven.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- maven.xml 25 Aug 2004 19:58:20 -0000 1.7
+++ maven.xml 16 Sep 2004 23:18:59 -0000 1.8
@@ -15,18 +15,8 @@
* limitations under the License.
*/
-->
-<project xmlns:util="jelly:util"
- xmlns:maven="jelly:maven"
- xmlns:j="jelly:core"
- xmlns:assert="assert"
- xmlns:ant="jelly:ant">
-
+<project xmlns:util="jelly:util" xmlns:maven="jelly:maven" xmlns:j="jelly:core"
xmlns:assert="assert" xmlns:ant="jelly:ant">
<goal name="testPlugin">
- <maven:reactor basedir="${basedir}"
- includes="test*/project.xml"
- goals="testPlugin"
- banner="Test"
- ignoreFailures="false"/>
+ <maven:reactor basedir="${basedir}" includes="test*/project.xml"
goals="testPlugin" banner="Test" ignoreFailures="false"/>
</goal>
-
-</project>
\ No newline at end of file
+</project>
1.1 maven-plugins/xdoc/src/plugin-test/test02/.cvsignore
Index: .cvsignore
===================================================================
*.log
target
1.1 maven-plugins/xdoc/src/plugin-test/test02/maven.xml
Index: maven.xml
===================================================================
<!--
/*
* 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.
*/
-->
<project xmlns:util="jelly:util" xmlns:j="jelly:core" xmlns:assert="assert"
xmlns:doc="doc" xmlns:x="jelly:xml">
<goal name="testPlugin" prereqs="clean,xdoc">
<j:set var="linkcheck"
value="${maven.build.dir}/linkcheck/linkcheck-results.xml"/>
<assert:assertFileExists file="${linkcheck}"/>
<util:file var="linkcheckFile" name="${linkcheck}"/>
<x:parse var="linkcheckDoc" xml="${linkcheckFile.toURL()}"/>
<x:set var="countLogo"
select="count($linkcheckDoc/linkcheck/file/result[contains(child::target,'apache-maven-project.png')][contains(child::status,'NOT
FOUND')])"/>
<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."/>
</goal>
</project>
1.1 maven-plugins/xdoc/src/plugin-test/test02/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* 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.
*/
-->
<project>
<pomVersion>3</pomVersion>
<id>test-maven-xdoc-plugin-02</id>
<name>MPXDOC-115</name>
<groupId>maven</groupId>
<currentVersion>1.0</currentVersion>
<organization>
<name>Apache Software Foundation</name>
<url>/project-info.html</url>
<logo>/images/apache-maven-project.png</logo>
</organization>
<logo>/images/maven.gif</logo>
<description>Test for MPXDOC-115</description>
<shortDescription>Test for MPXDOC-115</shortDescription>
<url>/project-info.html</url>
</project>
1.1
maven-plugins/xdoc/src/plugin-test/test02/xdocs/images/apache-maven-project.png
<<Binary file>>
1.1 maven-plugins/xdoc/src/plugin-test/test02/xdocs/images/maven.gif
<<Binary file>>
1.1
maven-plugins/xdoc/src/plugin-test/test02/xdocs/subdir/testjsltosite.xml
Index: testjsltosite.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.64 +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.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- changes.xml 22 Aug 2004 14:24:26 -0000 1.63
+++ changes.xml 16 Sep 2004 23:18:59 -0000 1.64
@@ -28,6 +28,7 @@
<body>
<release version="1.9-SNAPSHOT" date="in CVS">
<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>
<action dev="carlos" type="add" issue="MPFAQ-11">Added dt css style</action>
<action dev="brett" type="add">Add a legend for the symbols in the xdoc,
disabled by setting <code>maven.xdoc.legend=false</code></action>
</release>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]