Fix + test for MPXDOC 115
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116047 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
d5a4bdbfc6
commit
923d071be1
9 files changed
+117
-15
No files matched your search
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
</project>
|
||||
@@ -0,0 +1,2 @@
|
||||
*.log
|
||||
target
|
||||
@@ -0,0 +1,29 @@
|
||||
<!--
|
||||
/*
|
||||
* 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>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,35 @@
|
||||
<?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>
|
||||
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user