maven-plugins/jdepend/plugin.jelly
ltheussl a3a296b0c2 PR: MPJDEPEND-2, MPJDEPEND-3
New property maven.jdepend.properties to specify a custom jdepend.properties file.


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@373651 13f79535-47bb-0310-9956-ffa450edef68
2006-01-31 00:33:04 +00:00

93 lines
2.9 KiB
XML

<?xml version="1.0"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<project
xmlns:ant="jelly:ant"
xmlns:j="jelly:core"
xmlns:u="jelly:util"
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'}">
<j:if test="${maven.compile.debug != 'on'}">
<echo>
*** WARNING: JDepend is only fully functional if source files are compiled with debugging information turned on.
*** The source file cross links generated by this run of JDepend will not be correct.
*** Please set maven.compile.debug = on
</echo>
</j:if>
<attainGoal name="java:compile"/>
<u:available file="${maven.jdepend.properties}">
<ant:copy file="${maven.jdepend.properties}" tofile="${maven.build.dest}/jdepend.properties" failonerror="false"/>
</u:available>
<ant:java
classname="jdepend.xmlui.JDepend"
fork="true"
failonerror="true">
<ant:arg line="-components '${maven.jdepend.components}' -file '${maven.build.dir}/jdepend-raw-report.xml' '${maven.jdepend.dirs}'"/>
<ant:classpath>
<ant:path refid="maven-classpath"/>
<ant:path refid="maven.dependency.classpath"/>
<ant:pathelement path="${plugin.getDependencyPath('jdepend:jdepend')}"/>
<ant:pathelement path="${maven.build.dest}"/>
</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>