MAVEN-239: Once the patches for JDepend go through, there will be a new attribute
on Class items - sourceFile. This patch lets the report understand and more correctly report with the new attributes. (link to xref for inner classes is more correct). git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@112800 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4567fe9f94
commit
09de2f3a44
@ -16,6 +16,7 @@
|
|||||||
<j:useBean var="htmlescape" class="org.apache.velocity.anakia.Escape"/>
|
<j:useBean var="htmlescape" class="org.apache.velocity.anakia.Escape"/>
|
||||||
<j:useBean var="fileutil" class="org.apache.velocity.texen.util.FileUtil"/>
|
<j:useBean var="fileutil" class="org.apache.velocity.texen.util.FileUtil"/>
|
||||||
<j:useBean var="pathtool" class="org.apache.maven.DVSLPathTool"/>
|
<j:useBean var="pathtool" class="org.apache.maven.DVSLPathTool"/>
|
||||||
|
<j:useBean var="stringTool" class="org.apache.maven.StringTool"/>
|
||||||
|
|
||||||
<define:taglib uri="jdepend">
|
<define:taglib uri="jdepend">
|
||||||
<define:tag name="nav">
|
<define:tag name="nav">
|
||||||
@ -44,9 +45,23 @@
|
|||||||
</j:when>
|
</j:when>
|
||||||
<j:otherwise>
|
<j:otherwise>
|
||||||
<j:forEach var="class" items="${currentNode.selectNodes(xpath)}">
|
<j:forEach var="class" items="${currentNode.selectNodes(xpath)}">
|
||||||
<j:set var="index" value="${class.getStringValue().lastIndexOf('.') + 1}"/>
|
<!-- class.StringValue =~ org.apache.maven.SomeClass -->
|
||||||
<util:replace var="dir" oldChar="." newChar="/" value="${class.getStringValue()}"/>
|
<j:set var="packageName" value="${stringTool.splitStringAtLastDelim(class.StringValue, '.').get(0)}"/>
|
||||||
<a href="xref/${dir}.html">${class.getStringValue().substring(mavenTool.toInteger(index.toString()))}</a>
|
<j:set var="className" value="${stringTool.splitStringAtLastDelim(class.StringValue, '.').get(1)}"/>
|
||||||
|
<util:replace var="dir" oldChar="." newChar="/" value="${packageName}"/>
|
||||||
|
|
||||||
|
<j:choose>
|
||||||
|
<j:when test="${class.attribute('sourceFile') != null}">
|
||||||
|
<j:set var="classSourceFile" value="${class.attribute('sourceFile').getValue()}"/>
|
||||||
|
<j:set var="classSourceFile" value="${stringTool.splitStringAtLastDelim(classSourceFile, '.').get(0)}"/>
|
||||||
|
|
||||||
|
<a href="xref/${dir}/${classSourceFile}.html">${className}</a>
|
||||||
|
</j:when>
|
||||||
|
<j:otherwise>
|
||||||
|
<a href="xref/${dir}/${className}.html">${className}</a>
|
||||||
|
</j:otherwise>
|
||||||
|
</j:choose>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
</j:forEach>
|
</j:forEach>
|
||||||
</j:otherwise>
|
</j:otherwise>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user