maven-plugins/jdepend/plugin.jelly

61 lines
1.7 KiB
XML

<?xml version="1.0"?>
<project
xmlns:ant="jelly:ant"
xmlns:j="jelly:core"
xmlns:doc="doc">
<goal name="maven-jdepend-plugin:register">
<j:if test="${sourcesPresent == 'true'}">
<doc:registerReport
name="Metrics"
pluginName="maven-jdepend-plugin"
link="jdepend-report"
description="Report on source code metrics."/>
</j:if>
</goal>
<goal name="maven-jdepend-plugin:deregister">
<j:if test="${sourcesPresent == 'true'}">
<doc:deregisterReport name="Metrics"/>
</j:if>
</goal>
<!-- ================================================================== -->
<!-- J D E P E N D X M L T A R G E T -->
<!-- ================================================================== -->
<goal
name="maven-jdepend-plugin:report"
description="Generate a dependency report with JDepend">
<j:if test="${sourcesPresent == 'true'}">
<attainGoal name="java:compile"/>
<ant:java
classname="jdepend.xmlui.JDepend"
fork="true"
failonerror="true">
<ant:arg line="-file '${maven.build.dir}/jdepend-raw-report.xml' '${maven.build.dest}'"/>
<ant:classpath>
<ant:path refid="maven-classpath"/>
<ant:path refid="maven.dependency.classpath"/>
<ant:pathelement path="${plugin.getDependencyPath('jdepend')}"/>
</ant:classpath>
</ant:java>
<doc:jsl
input="${maven.build.dir}/jdepend-raw-report.xml"
output="jdepend-report.xml"
stylesheet="${plugin.resources}/jdepend.jsl"
outputMode="xml"
prettyPrint="true"
/>
</j:if>
</goal>
</project>