Fix for MAVEN-694

Thanks to Martin Skopp.

Patch was applied with some changes


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113869 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
dion committed 2003-08-22 01:34:09 +00:00
1 parent 5de1f2a067
commit d8829f536d
2 files changed
+86 -3

No files matched your search

+35 -3
View File
@@ -66,9 +66,17 @@
<ant:property name="title" value="${pom.name} ${pom.currentVersion} API"/>
<j:choose>
<j:when test="${maven.mode.online}"/>
<j:when test="${maven.mode.online}">
<util:tokenize var="links" delim="," trim="true">${maven.javadoc.links}</util:tokenize>
<j:forEach var="link" items="${links}">
<ant:echo>Linking with API information from ${link.trim()} ...</ant:echo>
</j:forEach>
</j:when>
<j:otherwise>
<j:set var="maven.javadoc.links" value=""/>
<util:tokenize var="links" delim="," trim="true">${maven.javadoc.offlineLinks}</util:tokenize>
<j:forEach var="link" items="${links}">
<ant:echo>Linking offline API information from ${link.trim()} ...</ant:echo>
</j:forEach>
</j:otherwise>
</j:choose>
@@ -119,9 +127,33 @@
<ant:setProperty name="source" value="${maven.javadoc.source}" />
</j:if>
<!-- Process/Parse links -->
<!-- This code allows to specify a packagelistLoc even when in online mode -->
<j:forEach var="link" items="${links}">
<ant:link href="${link.trim()}"/>
<j:set var="pos" value="${link.indexOf('#')}" />
<!-- set href and packagelistLoc -->
<j:choose>
<!-- I am bad with jelly, the test is: "pos == -1" -->
<j:when test="${1+pos == 0}">
<j:set var="href" value="${link.trim()}" />
<j:set var="packagelistLoc" value="${href}"/>
</j:when>
<j:otherwise>
<j:set var="href" value="${link.substring(0,pos).trim()}"/>
<j:set var="packagelistLoc" value="${link.substring(pos).substring(1).trim()}"/>
</j:otherwise>
</j:choose>
<!-- generate the link -->
<j:choose>
<j:when test="${maven.mode.online}" />
<ant:link href="${href}" offline="false" packagelistLoc="${packagelistLoc}" />
<j:otherwise />
<ant:link href="${href}" offline="true" packagelistLoc="${packagelistLoc}" />
</j:choose>
</j:forEach>
<ant:classpath>
<ant:path refid="maven.dependency.classpath"/>
<ant:path location="${maven.build.dest}"/>
+51
View File
@@ -58,6 +58,57 @@
from the project descriptor.
</td>
</tr>
<tr>
<td>maven.javadoc.links</td>
<td>Yes</td>
<td>
<p>
Comma separated list of URLs to create links to javadoc output of
other packages in online mode (maven.online.mode=true), works like
the "-link" option of the javadoc command.
</p>
<p>
The URLs must link to a directory where the javadoc generated file
"package-list" is accesible for the package.
</p>
<p>Example:</p>
<source>
maven.javadoc.links=http://java.sun.com/j2se/1.4.2/docs/api/, http://maven.apache.org/apidocs/
</source>
</td>
</tr>
<tr>
<td>maven.javadoc.offlineLinks</td>
<td>Yes</td>
<td>
<p>
Comma seperated list of URLs to create links to javadoc output of
other packages in offline mode (maven.online.mode=false), works like
the "-linkoffline" option of the javadoc command.
Comma seperated list of URLs to create links to javadoc output of
other packages, works like the "-link" option of the javadoc command.
</p>
<p>
The URLs must link to a directory where the javadoc generated file
"package-list" is accesible for the package.
</p>
<p>Example (generates <b>offline</b> links in offline mode):</p>
<source>
maven.javadoc.offlineLinks=/opt/java-apidoc/j2sdk1.4.1/docs/api/, /cvsroot/maven/target/docs/apidocs/
</source>
<p>
Generation of online javadoc links in offline mode is also possible.
You need to provide the online URL plus the a offline directory
resource for "package-list". URL and directory need to be seperated
by the "#" character.
</p>
<p>Example (generates <b>online</b> links in offline mode):</p>
<source>
maven.javadoc.offlineLinks=http://java.sun.com/j2se/1.4.2/docs/api/#/opt/java-apidoc/j2sdk1.4.1/docs/api/, \
http://maven.apache.org/apidocs/#/cvsroot/maven/target/docs/apidocs/
</source>
</td>
</tr>
<tr>
<td>maven.javadoc.private</td>
<td>Yes</td>