MAVEN-214: LinkChecker plugin
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@112777 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
17b604c9d2
commit
fa5ca2bd70
36 files changed
+1839
No files matched your search
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<project
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:define="jelly:define"
|
||||
xmlns:linkcheck="linkcheck"
|
||||
xmlns:doc="doc">
|
||||
|
||||
<property name="maven.linkcheck.cache" value="${pom.getPluginContext('maven-linkcheck-plugin').getVariable('maven.linkcheck.cache')}"/>
|
||||
<j:if test="${context.getVariable('maven.linkcheck.enable') != null}">
|
||||
<j:set var="maven.linkcheck.enable" value="true"/>
|
||||
</j:if>
|
||||
|
||||
<define:taglib uri="linkcheck">
|
||||
<define:jellybean
|
||||
name="linkcheck"
|
||||
className="org.apache.maven.linkcheck.LinkCheck"
|
||||
method="doExecute"
|
||||
/>
|
||||
</define:taglib>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- C R E A T E L I N K C H E C K X M L R E P O R T -->
|
||||
<!-- ================================================================== -->
|
||||
|
||||
<!-- The reason for the odd goal configuration is this:
|
||||
We really don't want the link checker to run until everything else is complete
|
||||
-->
|
||||
|
||||
<goal name="maven-linkcheck-plugin:report">
|
||||
<echo>This run of linkcheck does nothing except create a template linkcheck file</echo>
|
||||
<copy fromFile="${plugin.resources}/linkcheck-temp.xml" toFile="${maven.build.dir}/linkcheck.xml"/>
|
||||
</goal>
|
||||
|
||||
<postGoal name="xdoc:jelly-transform">
|
||||
<attainGoal name="maven-linkcheck-plugin:report-real"/>
|
||||
</postGoal>
|
||||
|
||||
<goal
|
||||
name="maven-linkcheck-plugin:report-real"
|
||||
description="Generate a report from the link check results">
|
||||
<echo>BaseDir: ${basedir}</echo>
|
||||
<mkdir dir="${maven.build.dir}/linkcheck"/>
|
||||
<mkdir dir="${maven.build.dir}/linkcheck/docs"/>
|
||||
<j:choose>
|
||||
<j:when test="${maven.linkcheck.enable}">
|
||||
<echo>Generating the LinkCheck report</echo>
|
||||
<linkcheck:linkcheck
|
||||
cache="${maven.linkcheck.cache}"
|
||||
exclude="${pom.repository.url}"
|
||||
basedir="${maven.docs.dest}"
|
||||
output="${maven.build.dir}/linkcheck/linkcheck-results.xml"
|
||||
outputEncoding="${maven.docs.outputencoding}"
|
||||
/>
|
||||
|
||||
<doc:jsl
|
||||
input="${maven.build.dir}/linkcheck/linkcheck-results.xml"
|
||||
output="../linkcheck/docs/linkcheck.xml"
|
||||
stylesheet="${plugin.resources}/linkcheck.jsl"
|
||||
omitXmlDeclaration="true"
|
||||
outputMode="xml"
|
||||
prettyPrint="true"
|
||||
/>
|
||||
|
||||
<j:set var="maven.xdoc.src" value="${maven.build.dir}/linkcheck/docs"/>
|
||||
<echo>maven.xdoc.src: ${maven.xdoc.src}</echo>
|
||||
<attainGoal name="xdoc:performJSL"/>
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<echo>LinkCheck not enabled as maven.linkcheck.enable is not defined.</echo>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
|
||||
</goal>
|
||||
|
||||
<goal name="maven-linkcheck-plugin:clearcache"
|
||||
description="Removes the cache file">
|
||||
<delete file="${maven.linkcheck.cache}"/>
|
||||
</goal>
|
||||
|
||||
|
||||
</project>
|
||||
Reference in new issue
Block a user