Files
maven-plugins/jxr/plugin.jelly
T
bwalding 7fceb0810d o Due to the variations between projects, some projects are passing in full paths
and others are relative paths.  This change checks to see if the path has 
  already been appended to ${basedir}. If not, it prepends basedir.  JXRBean
now expects something that will slot directly into new File(path).


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@112968 13f79535-47bb-0310-9956-ffa450edef68
2003-02-21 22:33:53 +00:00

104 lines
3.0 KiB
XML

<?xml version="1.0"?>
<project
xmlns:j="jelly:core"
xmlns:define="jelly:define"
xmlns:doc="doc"
xmlns:jxr="jxr">
<goal name="maven-jxr-plugin:register">
<j:if test="${sourcesPresent}">
<doc:registerReport
name="Source Xref"
link="xref/index"
description="A set of browsable cross-referenced sources."/>
<j:if test="${unitTestSourcesPresent}">
<doc:registerReport
name="Test Xref"
link="xref-test/index"
description="A set of browsable cross-referenced test sources."/>
</j:if>
</j:if>
</goal>
<define:taglib uri="jxr">
<define:jellybean
name="jxr"
className="org.apache.maven.jxr.JxrBean"
method="xref"
/>
</define:taglib>
<!-- ================================================================== -->
<!-- C R O S S R E F E R E N C E S O U R C E S -->
<!-- ================================================================== -->
<!-- Should we deprecate it to use only 'jxr' ? -->
<goal
name="maven-jxr-plugin:report"
description="Generate HTML cross reference sources">
<j:if test="${sourcesPresent == 'true'}">
<mkdir dir="${maven.jxr.destdir}"/>
<!-- If the 'startDir' attribute changes we need to update
CodeTransform.java in o.a.m.jxr, this will be fixed. -->
<echo>${maven.sourcesPresent}</echo>
<j:set var="javadocDestdir"
value="${pom.getPluginContext('maven-javadoc-plugin').getVariable('maven.javadoc.destdir')}"/>
<property
name="copyright"
value="Copyright &amp;copy; ${year} ${pom.organization.name}. All Rights Reserved."
/>
<property
name="title"
value="${pom.name} ${pom.currentVersion} Reference"
/>
<copy file="${maven.jxr.stylesheet}"
tofile="${maven.jxr.destdir}/stylesheet.css"/>
<!-- XXX This is a dirty hack until the semantics of pom.build.sourceDirectory are cleared up -->
<j:set var="sourceDir" value="${pom.build.sourceDirectory}"/>
<j:if test="${!pom.build.sourceDirectory.startsWith(basedir)}">
<j:set var="sourceDir" value="${basedir}/${pom.build.sourceDirectory}"/>
</j:if>
<jxr:jxr
basedir="${basedir}"
sourceDir="${pom.build.sourceDirectory}"
destDir="${maven.jxr.destdir}"
templateDir="${maven.jxr.templateDir}"
javadocDir="${javadocDestdir}"
windowTitle="${title}"
docTitle="${title}"
bottom="${copyright}">
</jxr:jxr>
<j:if test="${unitTestSourcesPresent == 'true'}">
<mkdir dir="${maven.jxr.destdir.test}"/>
<jxr:jxr
basedir="${basedir}"
sourceDir="${pom.build.unitTestSourceDirectory}"
destDir="${maven.jxr.destdir.test}"
templateDir="${maven.jxr.templateDir}"
javadocDir="${null}"
windowTitle="${title}"
docTitle="${title}"
bottom="${copyright}">
</jxr:jxr>
</j:if>
</j:if>
</goal>
</project>