evenisse 2004/02/06 10:11:29
Modified: javadoc plugin.jelly
Log:
indent correctly.
Revision Changes Path
1.31 +146 -155 maven-plugins/javadoc/plugin.jelly
Index: plugin.jelly
===================================================================
RCS file: /home/cvs/maven-plugins/javadoc/plugin.jelly,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- plugin.jelly 6 Feb 2004 17:56:25 -0000 1.30
+++ plugin.jelly 6 Feb 2004 18:11:29 -0000 1.31
@@ -41,32 +41,29 @@
<define:tag name="check-needed">
<j:choose>
-
<j:when test="${needed != null}">
- <!-- We have already decided if javadoc is needed -->
- </j:when>
-
+ <!-- We have already decided if javadoc is needed -->
+ </j:when>
<j:when test="${sourcesPresent != 'true'}">
<j:set var="needed" value="false" />
</j:when>
-
- <j:otherwise>
+ <j:otherwise>
<ant:fileset id="sourceSet" dir="${pom.build.sourceDirectory}">
<ant:include name="**/*.java"/>
- <!-- FIXME: This is a bad cut and paste -->
- <!-- handle source modifications -->
- <j:forEach var="sm" items="${pom.build.sourceModifications}">
- <ant:available property="classPresent" classname="${sm.className}"/>
- <j:if test="${classPresent != 'true'}">
- <j:forEach var="exclude" items="${sm.excludes}">
- <ant:exclude name="${exclude}"/>
- </j:forEach>
- <j:forEach var="include" items="${sm.includes}">
- <ant:include name="${include}"/>
- </j:forEach>
- </j:if>
- </j:forEach>
- </ant:fileset>
+ <!-- FIXME: This is a bad cut and paste -->
+ <!-- handle source modifications -->
+ <j:forEach var="sm" items="${pom.build.sourceModifications}">
+ <ant:available property="classPresent" classname="${sm.className}"/>
+ <j:if test="${classPresent != 'true'}">
+ <j:forEach var="exclude" items="${sm.excludes}">
+ <ant:exclude name="${exclude}"/>
+ </j:forEach>
+ <j:forEach var="include" items="${sm.includes}">
+ <ant:include name="${include}"/>
+ </j:forEach>
+ </j:if>
+ </j:forEach>
+ </ant:fileset>
<ant:fileScanner var="sources">
<ant:fileset refid="sourceSet" />
@@ -74,8 +71,7 @@
<j:set var="needed" scope="parent"
value="${sources.iterator().hasNext()}" />
- </j:otherwise>
-
+ </j:otherwise>
</j:choose>
</define:tag>
@@ -101,41 +97,41 @@
<!-- Get the year to display in the Javadocs -->
<ant:tstamp>
- <ant:format property="currentYear" pattern="yyyy"/>
+ <ant:format property="currentYear" pattern="yyyy"/>
</ant:tstamp>
<ant:tstamp>
- <j:choose>
- <j:when test="${pom.inceptionYear.equals(currentYear)}">
- <ant:format property="year" pattern="yyyy"/>
- </j:when>
- <j:otherwise>
- <ant:format property="year" pattern="${pom.inceptionYear}-yyyy"/>
- </j:otherwise>
- </j:choose>
+ <j:choose>
+ <j:when test="${pom.inceptionYear.equals(currentYear)}">
+ <ant:format property="year" pattern="yyyy"/>
+ </j:when>
+ <j:otherwise>
+ <ant:format property="year" pattern="${pom.inceptionYear}-yyyy"/>
+ </j:otherwise>
+ </j:choose>
</ant:tstamp>
<ant:property name="copyright"
- value="Copyright &copy; ${year} ${pom.organization.name}. All Rights
Reserved." />
+ value="Copyright &copy; ${year} ${pom.organization.name}. All Rights
Reserved." />
<!-- calculate online/offline mode -->
<j:set var="online" value="${maven.javadoc.mode.online}"/>
<j:if test="${empty(online)}">
- <j:set var="online" value="${maven.mode.online}"/>
+ <j:set var="online" value="${maven.mode.online}"/>
</j:if>
<j:choose>
- <j:when test="${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>
- <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:when test="${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>
+ <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>
<j:set var="maxMemory" value="${maven.javadoc.maxmemory}" />
@@ -144,122 +140,121 @@
<ant:record name="${maven.build.dir}/javadoc/report.txt" action="start" />
<ant:javadoc
- packagenames="${pom.package}.*"
- destdir="${maven.javadoc.destdir}"
- author="${maven.javadoc.author}"
- public="${maven.javadoc.public}"
- package="${maven.javadoc.package}"
- private="${maven.javadoc.private}"
- version="${maven.javadoc.version}"
- use="${maven.javadoc.use}"
- windowtitle="${maven.javadoc.windowtitle}"
- doctitle="${maven.javadoc.windowtitle}"
- bottom="${copyright}"
- stylesheetfile="${maven.javadoc.stylesheet}"
- additionalparam="${maven.javadoc.additionalparam}"
- useexternalfile="${maven.javadoc.useexternalfile}">
-
- <!-- sourceSet is set by the javadoc:check-needed function -->
- <ant:fileset refid="sourceSet" />
-
- <j:if test="${context.getVariable('maven.javadoc.source') != null}">
- <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}">
- <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="${online}" >
- <ant:link href="${href}" offline="false" packagelistLoc="${packagelistLoc}" />
- </j:when>
- <j:otherwise>
- <ant:link href="${href}" offline="true" packagelistLoc="${packagelistLoc}" />
- </j:otherwise>
- </j:choose>
- </j:forEach>
-
- <ant:classpath>
- <ant:path refid="maven.dependency.classpath"/>
- <ant:path location="${maven.build.dest}"/>
- </ant:classpath>
-
- <j:if test="${context.getVariable('maven.javadoc.locale') != null}">
- <ant:setProperty name="locale" value="${maven.javadoc.locale}" />
- </j:if>
-
- <j:if test="${context.getVariable('maven.javadoc.overview') != null}">
- <ant:setProperty name="overview" value="${maven.javadoc.overview}" />
- </j:if>
-
- <j:if test="${maxMemory != null}">
- <ant:setProperty name="maxmemory" value="${maven.javadoc.maxmemory}" />
- </j:if>
-
- <j:forEach var="packageGroup" items="${pom.packageGroups}">
- <ant:group title="${packageGroup.title}" packages="${packageGroup.packages}"/>
- </j:forEach>
-
- <!-- allow custom doclets -->
- <j:if test="${context.getVariable('maven.javadoc.doclet') != null}">
- <ant:setProperty name="doclet" value="${maven.javadoc.doclet}" />
- </j:if>
- <j:if test="${context.getVariable('maven.javadoc.docletpath') != null}">
- <ant:setProperty name="docletpath" value="${maven.javadoc.docletpath}" />
- </j:if>
-
- <!-- allow custom tags -->
- <util:tokenize var="listOfTags" delim="
">${maven.javadoc.customtags}</util:tokenize>
- <j:forEach var="someTag" items="${listOfTags}">
- <j:set var="nameVar" value="${someTag}.name"/>
- <j:set var="name" value="${context.findVariable(nameVar)}"/>
- <j:set var="descriptionVar" value="${someTag}.description"/>
- <j:set var="description" value="${context.findVariable(descriptionVar)}"/>
- <j:set var="enabledVar" value="${someTag}.enabled"/>
- <j:set var="enabled" value="${context.findVariable(enabledVar)}"/>
- <j:set var="scopeVar" value="${someTag}.scope"/>
- <j:set var="scope" value="${context.findVariable(scopeVar)}"/>
- <ant:tag name="${name}" description="${description}"
- enabled="${enabled}" scope="${scope}"/>
- </j:forEach>
-
- <!-- allow taglets -->
- <util:tokenize var="listOfTaglets" delim=","
trim="true">${maven.javadoc.taglets}</util:tokenize>
- <j:set var="tagletPath"
value="${context.getVariable('maven.javadoc.tagletpath')}" />
- <j:forEach var="someTaglet" items="${listOfTaglets}">
- <ant:taglet name="${someTaglet}" path="${tagletPath}" />
- </j:forEach>
+ packagenames="${pom.package}.*"
+ destdir="${maven.javadoc.destdir}"
+ author="${maven.javadoc.author}"
+ public="${maven.javadoc.public}"
+ package="${maven.javadoc.package}"
+ private="${maven.javadoc.private}"
+ version="${maven.javadoc.version}"
+ use="${maven.javadoc.use}"
+ windowtitle="${maven.javadoc.windowtitle}"
+ doctitle="${maven.javadoc.windowtitle}"
+ bottom="${copyright}"
+ stylesheetfile="${maven.javadoc.stylesheet}"
+ additionalparam="${maven.javadoc.additionalparam}"
+ useexternalfile="${maven.javadoc.useexternalfile}">
+
+ <!-- sourceSet is set by the javadoc:check-needed function -->
+ <ant:fileset refid="sourceSet" />
+
+ <j:if test="${context.getVariable('maven.javadoc.source') != null}">
+ <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}">
+ <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="${online}" >
+ <ant:link href="${href}" offline="false"
packagelistLoc="${packagelistLoc}" />
+ </j:when>
+ <j:otherwise>
+ <ant:link href="${href}" offline="true"
packagelistLoc="${packagelistLoc}" />
+ </j:otherwise>
+ </j:choose>
+ </j:forEach>
+
+ <ant:classpath>
+ <ant:path refid="maven.dependency.classpath"/>
+ <ant:path location="${maven.build.dest}"/>
+ </ant:classpath>
+
+ <j:if test="${context.getVariable('maven.javadoc.locale') != null}">
+ <ant:setProperty name="locale" value="${maven.javadoc.locale}" />
+ </j:if>
+
+ <j:if test="${context.getVariable('maven.javadoc.overview') != null}">
+ <ant:setProperty name="overview" value="${maven.javadoc.overview}" />
+ </j:if>
+
+ <j:if test="${maxMemory != null}">
+ <ant:setProperty name="maxmemory" value="${maven.javadoc.maxmemory}" />
+ </j:if>
+
+ <j:forEach var="packageGroup" items="${pom.packageGroups}">
+ <ant:group title="${packageGroup.title}"
packages="${packageGroup.packages}"/>
+ </j:forEach>
+
+ <!-- allow custom doclets -->
+ <j:if test="${context.getVariable('maven.javadoc.doclet') != null}">
+ <ant:setProperty name="doclet" value="${maven.javadoc.doclet}" />
+ </j:if>
+ <j:if test="${context.getVariable('maven.javadoc.docletpath') != null}">
+ <ant:setProperty name="docletpath" value="${maven.javadoc.docletpath}" />
+ </j:if>
+
+ <!-- allow custom tags -->
+ <util:tokenize var="listOfTags" delim="
">${maven.javadoc.customtags}</util:tokenize>
+ <j:forEach var="someTag" items="${listOfTags}">
+ <j:set var="nameVar" value="${someTag}.name"/>
+ <j:set var="name" value="${context.findVariable(nameVar)}"/>
+ <j:set var="descriptionVar" value="${someTag}.description"/>
+ <j:set var="description" value="${context.findVariable(descriptionVar)}"/>
+ <j:set var="enabledVar" value="${someTag}.enabled"/>
+ <j:set var="enabled" value="${context.findVariable(enabledVar)}"/>
+ <j:set var="scopeVar" value="${someTag}.scope"/>
+ <j:set var="scope" value="${context.findVariable(scopeVar)}"/>
+ <ant:tag name="${name}" description="${description}"
+ enabled="${enabled}" scope="${scope}"/>
+ </j:forEach>
+
+ <!-- allow taglets -->
+ <util:tokenize var="listOfTaglets" delim=","
trim="true">${maven.javadoc.taglets}</util:tokenize>
+ <j:set var="tagletPath"
value="${context.getVariable('maven.javadoc.tagletpath')}" />
+ <j:forEach var="someTaglet" items="${listOfTaglets}">
+ <ant:taglet name="${someTaglet}" path="${tagletPath}" />
+ </j:forEach>
</ant:javadoc>
<ant:record name="${maven.build.dir}/javadoc/report.txt" action="stop" />
<j:set var="genDocs" value="${maven.gen.docs}" />
<doc:text-xdoc
- title="Javadoc Report"
- section="Javadoc Report"
- inputFile="${maven.build.dir}/javadoc/report.txt"
- output="${genDocs}/javadoc.xml"/>
+ title="Javadoc Report"
+ section="Javadoc Report"
+ inputFile="${maven.build.dir}/javadoc/report.txt"
+ output="${genDocs}/javadoc.xml"/>
</j:if>
</goal>
-
<!--==================================================================-->
<!-- Create a jar file containing the javadoc -->
<!--==================================================================-->
@@ -328,8 +323,4 @@
project="${pom}"/>
</goal>
-
-
-
-
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]