Do not generate links to JXR files if they are not created.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@374441 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -121,19 +121,20 @@
|
||||
<!-- Where JXR files are generated for the code -->
|
||||
<j:set var="jxrDestDir" value="${maven.jxr.destdir}"/>
|
||||
<util:replace var="jxrDestDir" value="${jxrDestDir}" oldChar="\\" newChar="/"/>
|
||||
<!-- We create a relative path to the jxr files -->
|
||||
<!-- ${maven.jxr.destdir} should be a subdirectory of ${maven.docs.dest} -->
|
||||
<util:file var="jxrDestDirFile" name="${jxrDestDir}"/>
|
||||
<j:choose>
|
||||
<j:when test="${jxrDestDir.startsWith(docsDestDir)}">
|
||||
<j:set var="jxrDestDir" value="${jxrDestDir.substring(docsDestDir.length(),jxrDestDir.length())}"/>
|
||||
<!-- remove first slash if needed -->
|
||||
<j:if test="${jxrDestDir.startsWith('/')}">
|
||||
<j:set var="jxrDestDir" value="${jxrDestDir.substring(1,jxrDestDir.length())}"/>
|
||||
</j:if>
|
||||
<j:when test="${jxrDestDirFile.exists() and jxrDestDir.startsWith(docsDestDir)}">
|
||||
<!-- We create a relative path to the jxr files -->
|
||||
<!-- ${maven.jxr.destdir} should be a subdirectory of ${maven.docs.dest} -->
|
||||
<j:set var="jxrDestDir" value="${jxrDestDir.substring(docsDestDir.length(),jxrDestDir.length())}"/>
|
||||
<!-- remove first slash if needed -->
|
||||
<j:if test="${jxrDestDir.startsWith('/')}">
|
||||
<j:set var="jxrDestDir" value="${jxrDestDir.substring(1,jxrDestDir.length())}"/>
|
||||
</j:if>
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<!-- Use a default value :-( -->
|
||||
<j:set var="jxrDestDir" value="xref2"/>
|
||||
<!-- Do not generate the link -->
|
||||
<j:set var="jxrDestDir" value=""/>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
</j:if>
|
||||
@@ -141,19 +142,20 @@
|
||||
<!-- Where JXR files are generated for the tests -->
|
||||
<j:set var="jxrTestDestDir" value="${maven.jxr.destdir.test}"/>
|
||||
<util:replace var="jxrTestDestDir" value="${jxrTestDestDir}" oldChar="\\" newChar="/"/>
|
||||
<!-- We create a relative path to the jxr files for tests -->
|
||||
<!-- ${maven.jxr.destdir.test} should be a subdirectory of ${maven.docs.dest} -->
|
||||
<util:file var="jxrTestDestDirFile" name="${jxrTestDestDir}"/>
|
||||
<j:choose>
|
||||
<j:when test="${jxrTestDestDir.startsWith(docsDestDir)}">
|
||||
<j:set var="jxrTestDestDir" value="${jxrTestDestDir.substring(docsDestDir.length(),jxrTestDestDir.length())}"/>
|
||||
<!-- remove first slash if needed -->
|
||||
<j:if test="${jxrTestDestDir.startsWith('/')}">
|
||||
<j:set var="jxrTestDestDir" value="${jxrTestDestDir.substring(1,jxrTestDestDir.length())}"/>
|
||||
</j:if>
|
||||
<j:when test="${jxrTestDestDirFile.exists()} and jxrTestDestDir.startsWith(docsDestDir)">
|
||||
<!-- We create a relative path to the jxr files for tests -->
|
||||
<!-- ${maven.jxr.destdir.test} should be a subdirectory of ${maven.docs.dest} -->
|
||||
<j:set var="jxrTestDestDir" value="${jxrTestDestDir.substring(docsDestDir.length(),jxrTestDestDir.length())}"/>
|
||||
<!-- remove first slash if needed -->
|
||||
<j:if test="${jxrTestDestDir.startsWith('/')}">
|
||||
<j:set var="jxrTestDestDir" value="${jxrTestDestDir.substring(1,jxrTestDestDir.length())}"/>
|
||||
</j:if>
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<!-- Use a default value :-( -->
|
||||
<j:set var="jxrTestDestDir" value="xref-test2"/>
|
||||
<!-- Do not generate the link -->
|
||||
<j:set var="jxrTestDestDir" value=""/>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
</j:if>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
</properties>
|
||||
<body>
|
||||
<release version="1.8-SNAPSHOT" date="In SVN">
|
||||
<action dev="aheritier" type="fix">Do not generate links to JXR files if they are not created.</action>
|
||||
<action dev="aheritier" type="update">Use properties maven.jxr.destdir and maven.jxr.destdir.test to generate links from the PMD report to jxr files.</action>
|
||||
<action dev="aheritier" type="fix">Fix NullPointerException if pom.build.sourceDirectory or pom.build.unitTestSourceDirectory are not defined.</action>
|
||||
<action dev="aheritier" type="update">Upgrade to pmd-3.4.</action>
|
||||
|
||||
Reference in New Issue
Block a user