PR: MPCHECKSTYLE-52
The links to source xref files does not honor maven.jxr.destdir and maven.jxr.destdir.test. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@378121 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8f37844658
commit
c220304aac
@ -26,6 +26,7 @@
|
||||
xmlns:jsl="jelly:jsl"
|
||||
xmlns:util="jelly:util"
|
||||
xmlns:x="jelly:xml"
|
||||
xmlns:maven="jelly:maven"
|
||||
xmlns:doc="doc"
|
||||
xmlns="dummy" trim="true">
|
||||
|
||||
@ -132,23 +133,73 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- Where documentations are generated -->
|
||||
<j:set var="docsDestDir" value="${maven.docs.dest}"/>
|
||||
<util:replace var="docsDestDir" value="${docsDestDir}" oldChar="\\" newChar="/"/>
|
||||
<!-- JXR is activated ? -->
|
||||
<j:set var="jxrActivated" value="false"/>
|
||||
<j:forEach var="report" items="${pom.reports}">
|
||||
<j:if test="${report.equals('maven-jxr-plugin')}">
|
||||
<j:set var="jxrActivated" value="true"/>
|
||||
</j:if>
|
||||
</j:forEach>
|
||||
<j:if test="${pom.build.sourceDirectory != null}">
|
||||
<!-- Where JXR files are generated for the code -->
|
||||
<j:set var="jxrDestDir" value="${maven.jxr.destdir}"/>
|
||||
<util:replace var="jxrDestDir" value="${jxrDestDir}" oldChar="\\" newChar="/"/>
|
||||
<j:choose>
|
||||
<j:when test="${jxrActivated 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>
|
||||
<!-- Do not generate the link -->
|
||||
<j:set var="jxrDestDir" value=""/>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
</j:if>
|
||||
<j:if test="${pom.build.unitTestSourceDirectory != null}">
|
||||
<!-- 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="/"/>
|
||||
<maven:get var="xrefGeneratedForTests" plugin="maven-jxr-plugin" property="maven.jxr.include.testXref"/>
|
||||
<j:choose>
|
||||
<j:when test="${jxrActivated and xrefGeneratedForTests 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>
|
||||
<!-- Do not generate the link -->
|
||||
<j:set var="jxrTestDestDir" value=""/>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
</j:if>
|
||||
|
||||
<j:forEach var="file" items="${files}">
|
||||
<x:set var="errorCount" select="count($file/error)"/>
|
||||
<j:if test="${errorCount != 0}">
|
||||
<j:set var="name" value="${file.attribute('name').getValue()}"/>
|
||||
<j:set var="srcRelPathLen" value="${pathtool.getRelativePath(srcDir,name).length()}"/>
|
||||
<j:set var="jxrPath" value=""/>
|
||||
<j:if test="${srcRelPathLen > 0}">
|
||||
<j:if test="${srcRelPathLen > 0 and jxrActivated}">
|
||||
<j:set var="name" value="${name.substring(mavenTool.toInteger(srcDirLength.toString()))}"/>
|
||||
<!-- FIXME: this should be determined by ${maven.jxr.destdir} -->
|
||||
<j:set var="jxrPath" value="../xref"/>
|
||||
<j:set var="jxrPath" value="../${jxrDestDir}"/>
|
||||
</j:if>
|
||||
<j:if test="${pom.build.unitTestSourceDirectory != null}">
|
||||
<j:set var="tstRelPathLen" value="${pathtool.getRelativePath(tstDir,name).length()}"/>
|
||||
<j:if test="${tstRelPathLen > 0}">
|
||||
<j:if test="${tstRelPathLen > 0 and jxrActivated}">
|
||||
<j:set var="name" value="${name.substring(mavenTool.toInteger(tstDirLength.toString()))}"/>
|
||||
<!-- FIXME: this should be determined by ${maven.jxr.destdir.test} -->
|
||||
<j:set var="jxrPath" value="../xref-test"/>
|
||||
<j:set var="jxrPath" value="../${jxrTestDestDir}"/>
|
||||
</j:if>
|
||||
</j:if>
|
||||
<util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
xmlns:jsl="jelly:jsl"
|
||||
xmlns:util="jelly:util"
|
||||
xmlns:x="jelly:xml"
|
||||
xmlns:maven="jelly:maven"
|
||||
xmlns:doc="doc"
|
||||
xmlns="dummy" trim="true">
|
||||
|
||||
@ -136,23 +137,73 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- Where documentations are generated -->
|
||||
<j:set var="docsDestDir" value="${maven.docs.dest}"/>
|
||||
<util:replace var="docsDestDir" value="${docsDestDir}" oldChar="\\" newChar="/"/>
|
||||
<!-- JXR is activated ? -->
|
||||
<j:set var="jxrActivated" value="false"/>
|
||||
<j:forEach var="report" items="${pom.reports}">
|
||||
<j:if test="${report.equals('maven-jxr-plugin')}">
|
||||
<j:set var="jxrActivated" value="true"/>
|
||||
</j:if>
|
||||
</j:forEach>
|
||||
<j:if test="${pom.build.sourceDirectory != null}">
|
||||
<!-- Where JXR files are generated for the code -->
|
||||
<j:set var="jxrDestDir" value="${maven.jxr.destdir}"/>
|
||||
<util:replace var="jxrDestDir" value="${jxrDestDir}" oldChar="\\" newChar="/"/>
|
||||
<j:choose>
|
||||
<j:when test="${jxrActivated 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>
|
||||
<!-- Do not generate the link -->
|
||||
<j:set var="jxrDestDir" value=""/>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
</j:if>
|
||||
<j:if test="${pom.build.unitTestSourceDirectory != null}">
|
||||
<!-- 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="/"/>
|
||||
<maven:get var="xrefGeneratedForTests" plugin="maven-jxr-plugin" property="maven.jxr.include.testXref"/>
|
||||
<j:choose>
|
||||
<j:when test="${jxrActivated and xrefGeneratedForTests 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>
|
||||
<!-- Do not generate the link -->
|
||||
<j:set var="jxrTestDestDir" value=""/>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
</j:if>
|
||||
|
||||
<j:forEach var="file" items="${files}">
|
||||
<x:set var="errorCount" select="count($file/error[@severity=$severity])"/>
|
||||
<j:if test="${errorCount != 0}">
|
||||
<j:set var="name" value="${file.attribute('name').getValue()}"/>
|
||||
<j:set var="srcRelPathLen" value="${pathtool.getRelativePath(srcDir,name).length()}"/>
|
||||
<j:set var="jxrPath" value=""/>
|
||||
<j:if test="${srcRelPathLen > 0}">
|
||||
<j:if test="${srcRelPathLen > 0 and jxrActivated}">
|
||||
<j:set var="name" value="${name.substring(mavenTool.toInteger(srcDirLength.toString()))}"/>
|
||||
<!-- FIXME: this should be determined by ${maven.jxr.destdir} -->
|
||||
<j:set var="jxrPath" value="../xref"/>
|
||||
<j:set var="jxrPath" value="../${jxrDestDir}"/>
|
||||
</j:if>
|
||||
<j:if test="${pom.build.unitTestSourceDirectory != null}">
|
||||
<j:set var="tstRelPathLen" value="${pathtool.getRelativePath(tstDir,name).length()}"/>
|
||||
<j:if test="${tstRelPathLen > 0}">
|
||||
<j:if test="${tstRelPathLen > 0 and jxrActivated}">
|
||||
<j:set var="name" value="${name.substring(mavenTool.toInteger(tstDirLength.toString()))}"/>
|
||||
<!-- FIXME: this should be determined by ${maven.jxr.destdir.test} -->
|
||||
<j:set var="jxrPath" value="../xref-test"/>
|
||||
<j:set var="jxrPath" value="../${jxrTestDestDir}"/>
|
||||
</j:if>
|
||||
</j:if>
|
||||
<util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
</properties>
|
||||
<body>
|
||||
<release version="3.0.1-SNAPSHOT" date="in SVN">
|
||||
<action dev="ltheussl" type="fix" issue="MPCHECKSTYLE-52">The links to source xref files does not honor <code>maven.jxr.destdir</code> and <code>maven.jxr.destdir.test</code>.</action>
|
||||
<action dev="ltheussl" type="fix" issue="MPCHECKSTYLE-38">RSS file has incorrect links when used in multiproject build.</action>
|
||||
<action dev="ltheussl" type="fix" issue="MPCHECKSTYLE-9"><code>maven.checkstyle.header.file</code> now defaults to <code>${maven.license.licenseFile}</code>.</action>
|
||||
<action dev="ltheussl" type="fix" issue="MPCHECKSTYLE-53" due-to="Bernard Durfee">ClassCastException when moving from 2.5 to 3.0. Xalan is used for ant's style task.</action>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user