Check if unitTestSourceDirectory is present
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@374888 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
794ded338b
commit
e8ec3bed6e
@ -90,9 +90,11 @@
|
|||||||
<j:set var="fullSrcDir" value="${pom.build.sourceDirectory}"/>
|
<j:set var="fullSrcDir" value="${pom.build.sourceDirectory}"/>
|
||||||
<j:set var="srcDir" value="${fileutil.file(fullSrcDir).getCanonicalPath()}"/>
|
<j:set var="srcDir" value="${fileutil.file(fullSrcDir).getCanonicalPath()}"/>
|
||||||
<j:set var="srcDirLength" value="${srcDir.length() + 1}"/>
|
<j:set var="srcDirLength" value="${srcDir.length() + 1}"/>
|
||||||
<j:set var="fullTstDir" value="${pom.build.unitTestSourceDirectory}"/>
|
<j:if test="${pom.build.unitTestSourceDirectory != null}">
|
||||||
<j:set var="tstDir" value="${fileutil.file(fullTstDir).getCanonicalPath()}"/>
|
<j:set var="fullTstDir" value="${pom.build.unitTestSourceDirectory}"/>
|
||||||
<j:set var="tstDirLength" value="${tstDir.length() + 1}"/>
|
<j:set var="tstDir" value="${fileutil.file(fullTstDir).getCanonicalPath()}"/>
|
||||||
|
<j:set var="tstDirLength" value="${tstDir.length() + 1}"/>
|
||||||
|
</j:if>
|
||||||
|
|
||||||
<x:set var="files" select="file" sort="@name"/>
|
<x:set var="files" select="file" sort="@name"/>
|
||||||
<!-- x:forEach is busted -->
|
<!-- x:forEach is busted -->
|
||||||
@ -101,12 +103,14 @@
|
|||||||
<!-- Type coercion doesn't work worth a fuck in jexl. -->
|
<!-- Type coercion doesn't work worth a fuck in jexl. -->
|
||||||
<j:set var="name" value="${file.attribute('name').getValue()}"/>
|
<j:set var="name" value="${file.attribute('name').getValue()}"/>
|
||||||
<j:set var="srcRelPathLen" value="${pathtool.getRelativePath(srcDir,name).length()}"/>
|
<j:set var="srcRelPathLen" value="${pathtool.getRelativePath(srcDir,name).length()}"/>
|
||||||
<j:set var="tstRelPathLen" value="${pathtool.getRelativePath(tstDir,name).length()}"/>
|
|
||||||
<j:if test="${srcRelPathLen > 0}">
|
<j:if test="${srcRelPathLen > 0}">
|
||||||
<j:set var="name" value="${name.substring(mavenTool.toInteger(srcDirLength.toString()))}"/>
|
<j:set var="name" value="${name.substring(mavenTool.toInteger(srcDirLength.toString()))}"/>
|
||||||
</j:if>
|
</j:if>
|
||||||
<j:if test="${tstRelPathLen > 0}">
|
<j:if test="${pom.build.unitTestSourceDirectory != null}">
|
||||||
<j:set var="name" value="${name.substring(mavenTool.toInteger(tstDirLength.toString()))}"/>
|
<j:set var="tstRelPathLen" value="${pathtool.getRelativePath(tstDir,name).length()}"/>
|
||||||
|
<j:if test="${tstRelPathLen > 0}">
|
||||||
|
<j:set var="name" value="${name.substring(mavenTool.toInteger(tstDirLength.toString()))}"/>
|
||||||
|
</j:if>
|
||||||
</j:if>
|
</j:if>
|
||||||
<util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
|
<util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
|
||||||
<!--- +1 is for the trailing slash above -->
|
<!--- +1 is for the trailing slash above -->
|
||||||
@ -133,17 +137,19 @@
|
|||||||
<j:if test="${errorCount != 0}">
|
<j:if test="${errorCount != 0}">
|
||||||
<j:set var="name" value="${file.attribute('name').getValue()}"/>
|
<j:set var="name" value="${file.attribute('name').getValue()}"/>
|
||||||
<j:set var="srcRelPathLen" value="${pathtool.getRelativePath(srcDir,name).length()}"/>
|
<j:set var="srcRelPathLen" value="${pathtool.getRelativePath(srcDir,name).length()}"/>
|
||||||
<j:set var="tstRelPathLen" value="${pathtool.getRelativePath(tstDir,name).length()}"/>
|
|
||||||
<j:set var="jxrPath" value=""/>
|
<j:set var="jxrPath" value=""/>
|
||||||
<j:if test="${srcRelPathLen > 0}">
|
<j:if test="${srcRelPathLen > 0}">
|
||||||
<j:set var="name" value="${name.substring(mavenTool.toInteger(srcDirLength.toString()))}"/>
|
<j:set var="name" value="${name.substring(mavenTool.toInteger(srcDirLength.toString()))}"/>
|
||||||
<!-- FIXME: this should be determined by ${maven.jxr.destdir} -->
|
<!-- FIXME: this should be determined by ${maven.jxr.destdir} -->
|
||||||
<j:set var="jxrPath" value="../xref"/>
|
<j:set var="jxrPath" value="../xref"/>
|
||||||
</j:if>
|
</j:if>
|
||||||
<j:if test="${tstRelPathLen > 0}">
|
<j:if test="${pom.build.unitTestSourceDirectory != null}">
|
||||||
<j:set var="name" value="${name.substring(mavenTool.toInteger(tstDirLength.toString()))}"/>
|
<j:set var="tstRelPathLen" value="${pathtool.getRelativePath(tstDir,name).length()}"/>
|
||||||
<!-- FIXME: this should be determined by ${maven.jxr.destdir.test} -->
|
<j:if test="${tstRelPathLen > 0}">
|
||||||
<j:set var="jxrPath" value="../xref-test"/>
|
<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:if>
|
||||||
</j:if>
|
</j:if>
|
||||||
<util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
|
<util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
|
||||||
|
|
||||||
|
|||||||
@ -100,21 +100,25 @@
|
|||||||
<j:set var="fullSrcDir" value="${pom.build.sourceDirectory}"/>
|
<j:set var="fullSrcDir" value="${pom.build.sourceDirectory}"/>
|
||||||
<j:set var="srcDir" value="${fileutil.file(fullSrcDir).getCanonicalPath()}"/>
|
<j:set var="srcDir" value="${fileutil.file(fullSrcDir).getCanonicalPath()}"/>
|
||||||
<j:set var="srcDirLength" value="${srcDir.length() + 1}"/>
|
<j:set var="srcDirLength" value="${srcDir.length() + 1}"/>
|
||||||
<j:set var="fullTstDir" value="${pom.build.unitTestSourceDirectory}"/>
|
<j:if test="${pom.build.unitTestSourceDirectory != null}">
|
||||||
<j:set var="tstDir" value="${fileutil.file(fullTstDir).getCanonicalPath()}"/>
|
<j:set var="fullTstDir" value="${pom.build.unitTestSourceDirectory}"/>
|
||||||
<j:set var="tstDirLength" value="${tstDir.length() + 1}"/>
|
<j:set var="tstDir" value="${fileutil.file(fullTstDir).getCanonicalPath()}"/>
|
||||||
|
<j:set var="tstDirLength" value="${tstDir.length() + 1}"/>
|
||||||
|
</j:if>
|
||||||
<x:set var="files" select="file[./error[@severity=$severity]]" sort="@name"/>
|
<x:set var="files" select="file[./error[@severity=$severity]]" sort="@name"/>
|
||||||
<!-- x:forEach is busted -->
|
<!-- x:forEach is busted -->
|
||||||
<j:forEach var="file" items="${files}">
|
<j:forEach var="file" items="${files}">
|
||||||
<!-- Type coercion doesn't work worth a fuck in jexl. -->
|
<!-- Type coercion doesn't work worth a fuck in jexl. -->
|
||||||
<j:set var="name" value="${file.attribute('name').getValue()}"/>
|
<j:set var="name" value="${file.attribute('name').getValue()}"/>
|
||||||
<j:set var="srcRelPathLen" value="${pathtool.getRelativePath(srcDir,name).length()}"/>
|
<j:set var="srcRelPathLen" value="${pathtool.getRelativePath(srcDir,name).length()}"/>
|
||||||
<j:set var="tstRelPathLen" value="${pathtool.getRelativePath(tstDir,name).length()}"/>
|
|
||||||
<j:if test="${srcRelPathLen > 0}">
|
<j:if test="${srcRelPathLen > 0}">
|
||||||
<j:set var="name" value="${name.substring(mavenTool.toInteger(srcDirLength.toString()))}"/>
|
<j:set var="name" value="${name.substring(mavenTool.toInteger(srcDirLength.toString()))}"/>
|
||||||
</j:if>
|
</j:if>
|
||||||
<j:if test="${tstRelPathLen > 0}">
|
<j:if test="${pom.build.unitTestSourceDirectory != null}">
|
||||||
<j:set var="name" value="${name.substring(mavenTool.toInteger(tstDirLength.toString()))}"/>
|
<j:set var="tstRelPathLen" value="${pathtool.getRelativePath(tstDir,name).length()}"/>
|
||||||
|
<j:if test="${tstRelPathLen > 0}">
|
||||||
|
<j:set var="name" value="${name.substring(mavenTool.toInteger(tstDirLength.toString()))}"/>
|
||||||
|
</j:if>
|
||||||
</j:if>
|
</j:if>
|
||||||
<util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
|
<util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
|
||||||
<!--- +1 is for the trailing slash above -->
|
<!--- +1 is for the trailing slash above -->
|
||||||
@ -137,17 +141,19 @@
|
|||||||
<j:if test="${errorCount != 0}">
|
<j:if test="${errorCount != 0}">
|
||||||
<j:set var="name" value="${file.attribute('name').getValue()}"/>
|
<j:set var="name" value="${file.attribute('name').getValue()}"/>
|
||||||
<j:set var="srcRelPathLen" value="${pathtool.getRelativePath(srcDir,name).length()}"/>
|
<j:set var="srcRelPathLen" value="${pathtool.getRelativePath(srcDir,name).length()}"/>
|
||||||
<j:set var="tstRelPathLen" value="${pathtool.getRelativePath(tstDir,name).length()}"/>
|
|
||||||
<j:set var="jxrPath" value=""/>
|
<j:set var="jxrPath" value=""/>
|
||||||
<j:if test="${srcRelPathLen > 0}">
|
<j:if test="${srcRelPathLen > 0}">
|
||||||
<j:set var="name" value="${name.substring(mavenTool.toInteger(srcDirLength.toString()))}"/>
|
<j:set var="name" value="${name.substring(mavenTool.toInteger(srcDirLength.toString()))}"/>
|
||||||
<!-- FIXME: this should be determined by ${maven.jxr.destdir} -->
|
<!-- FIXME: this should be determined by ${maven.jxr.destdir} -->
|
||||||
<j:set var="jxrPath" value="../xref"/>
|
<j:set var="jxrPath" value="../xref"/>
|
||||||
</j:if>
|
</j:if>
|
||||||
<j:if test="${tstRelPathLen > 0}">
|
<j:if test="${pom.build.unitTestSourceDirectory != null}">
|
||||||
<j:set var="name" value="${name.substring(mavenTool.toInteger(tstDirLength.toString()))}"/>
|
<j:set var="tstRelPathLen" value="${pathtool.getRelativePath(tstDir,name).length()}"/>
|
||||||
<!-- FIXME: this should be determined by ${maven.jxr.destdir.test} -->
|
<j:if test="${tstRelPathLen > 0}">
|
||||||
<j:set var="jxrPath" value="../xref-test"/>
|
<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:if>
|
||||||
</j:if>
|
</j:if>
|
||||||
<util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
|
<util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user