You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Arnaud HERITIER <ah...@gmail.com> on 2006/02/04 18:42:59 UTC

Re: svn commit: r374888 - in /maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources: checkstyle-all.jsl checkstyle_severity_filter.jsl

Hi lukas, I didn't saw but in the pmd plugin I added the code to use
the properties maven.jxr.destdir and maven.jxr.destdir.test.
http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/pmd/src/plugin-resources/pmd.jsl?r1=371741&r2=374776&diff_format=h
There's a big block added in the middle of the file.
Can't we try to apply it to the checkstyle plugin before the release ?
Do you have the time to take a look at it or do you want that I try to
fix it (perhaps before the end of the WE)
Arnaud

On 2/4/06, ltheussl@apache.org <lt...@apache.org> wrote:
> Author: ltheussl
> Date: Sat Feb  4 09:18:31 2006
> New Revision: 374888
>
> URL: http://svn.apache.org/viewcvs?rev=374888&view=rev
> Log:
> Check if unitTestSourceDirectory is present
>
> Modified:
>     maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-all.jsl
>     maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle_severity_filter.jsl
>
> Modified: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-all.jsl
> URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-all.jsl?rev=374888&r1=374887&r2=374888&view=diff
> ==============================================================================
> --- maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-all.jsl (original)
> +++ maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle-all.jsl Sat Feb  4 09:18:31 2006
> @@ -90,9 +90,11 @@
>                <j:set var="fullSrcDir" value="${pom.build.sourceDirectory}"/>
>                <j:set var="srcDir" value="${fileutil.file(fullSrcDir).getCanonicalPath()}"/>
>                <j:set var="srcDirLength" value="${srcDir.length() + 1}"/>
> -              <j:set var="fullTstDir" value="${pom.build.unitTestSourceDirectory}"/>
> -              <j:set var="tstDir" value="${fileutil.file(fullTstDir).getCanonicalPath()}"/>
> -              <j:set var="tstDirLength" value="${tstDir.length() + 1}"/>
> +              <j:if test="${pom.build.unitTestSourceDirectory != null}">
> +                <j:set var="fullTstDir" value="${pom.build.unitTestSourceDirectory}"/>
> +                <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:forEach is busted -->
> @@ -101,12 +103,14 @@
>                  <!-- Type coercion doesn't work worth a fuck in jexl. -->
>                  <j:set var="name" value="${file.attribute('name').getValue()}"/>
>                  <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:set var="name" value="${name.substring(mavenTool.toInteger(srcDirLength.toString()))}"/>
>                  </j:if>
> -                <j:if test="${tstRelPathLen > 0}">
> -                  <j:set var="name" value="${name.substring(mavenTool.toInteger(tstDirLength.toString()))}"/>
> +                <j:if test="${pom.build.unitTestSourceDirectory != null}">
> +                  <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>
>                  <util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
>                  <!--- +1 is for the trailing slash above -->
> @@ -133,17 +137,19 @@
>              <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="tstRelPathLen" value="${pathtool.getRelativePath(tstDir,name).length()}"/>
>                <j:set var="jxrPath" value=""/>
>                <j:if test="${srcRelPathLen > 0}">
>                  <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:if>
> -              <j:if test="${tstRelPathLen > 0}">
> -                <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 test="${pom.build.unitTestSourceDirectory != null}">
> +                <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()))}"/>
> +                  <!--  FIXME: this should be determined by ${maven.jxr.destdir.test} -->
> +                  <j:set var="jxrPath" value="../xref-test"/>
> +                </j:if>
>                </j:if>
>                <util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
>
>
> Modified: maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle_severity_filter.jsl
> URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle_severity_filter.jsl?rev=374888&r1=374887&r2=374888&view=diff
> ==============================================================================
> --- maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle_severity_filter.jsl (original)
> +++ maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources/checkstyle_severity_filter.jsl Sat Feb  4 09:18:31 2006
> @@ -100,21 +100,25 @@
>                <j:set var="fullSrcDir" value="${pom.build.sourceDirectory}"/>
>                <j:set var="srcDir" value="${fileutil.file(fullSrcDir).getCanonicalPath()}"/>
>                <j:set var="srcDirLength" value="${srcDir.length() + 1}"/>
> -              <j:set var="fullTstDir" value="${pom.build.unitTestSourceDirectory}"/>
> -              <j:set var="tstDir" value="${fileutil.file(fullTstDir).getCanonicalPath()}"/>
> -              <j:set var="tstDirLength" value="${tstDir.length() + 1}"/>
> +              <j:if test="${pom.build.unitTestSourceDirectory != null}">
> +                <j:set var="fullTstDir" value="${pom.build.unitTestSourceDirectory}"/>
> +                <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:forEach is busted -->
>                <j:forEach var="file" items="${files}">
>                  <!-- Type coercion doesn't work worth a fuck in jexl. -->
>                  <j:set var="name" value="${file.attribute('name').getValue()}"/>
>                  <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:set var="name" value="${name.substring(mavenTool.toInteger(srcDirLength.toString()))}"/>
>                  </j:if>
> -                <j:if test="${tstRelPathLen > 0}">
> -                  <j:set var="name" value="${name.substring(mavenTool.toInteger(tstDirLength.toString()))}"/>
> +                <j:if test="${pom.build.unitTestSourceDirectory != null}">
> +                  <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>
>                  <util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
>                  <!--- +1 is for the trailing slash above -->
> @@ -137,17 +141,19 @@
>              <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="tstRelPathLen" value="${pathtool.getRelativePath(tstDir,name).length()}"/>
>                <j:set var="jxrPath" value=""/>
>                <j:if test="${srcRelPathLen > 0}">
>                  <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:if>
> -              <j:if test="${tstRelPathLen > 0}">
> -                <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 test="${pom.build.unitTestSourceDirectory != null}">
> +                <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()))}"/>
> +                  <!--  FIXME: this should be determined by ${maven.jxr.destdir.test} -->
> +                  <j:set var="jxrPath" value="../xref-test"/>
> +                </j:if>
>                </j:if>
>                <util:replace var="name" value="${name}" oldChar="\\" newChar="/"/>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r374888 - in /maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources: checkstyle-all.jsl checkstyle_severity_filter.jsl

Posted by Arnaud HERITIER <ah...@gmail.com>.
ok,it's not really serious to change the code after the release.
We can either postpone the release till we fix this enhancement or
release it as is.
I agree with you.
Let's go for the release.
We'll create a new one (perhaps before the beta 3) to include this enhancement.

Arnaud

On 2/4/06, Lukas Theussl <lt...@apache.org> wrote:
> I'll check it but I don't know if we are allowed to do big code changes
> after a vote. It's just a minor issue, IMO we could leave it for a
> bugfix release a bit later (there are a few minor issues open still that
> should be easy to fix). WDYT?
>
> -Lukas
>
> Arnaud HERITIER wrote:
> > Hi lukas, I didn't saw but in the pmd plugin I added the code to use
> > the properties maven.jxr.destdir and maven.jxr.destdir.test.
> > http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/pmd/src/plugin-resources/pmd.jsl?r1=371741&r2=374776&diff_format=h
> > There's a big block added in the middle of the file.
> > Can't we try to apply it to the checkstyle plugin before the release ?
> > Do you have the time to take a look at it or do you want that I try to
> > fix it (perhaps before the end of the WE)
> > Arnaud
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r374888 - in /maven/maven-1/plugins/trunk/checkstyle/src/plugin-resources: checkstyle-all.jsl checkstyle_severity_filter.jsl

Posted by Lukas Theussl <lt...@apache.org>.
I'll check it but I don't know if we are allowed to do big code changes 
after a vote. It's just a minor issue, IMO we could leave it for a 
bugfix release a bit later (there are a few minor issues open still that 
should be easy to fix). WDYT?

-Lukas

Arnaud HERITIER wrote:
> Hi lukas, I didn't saw but in the pmd plugin I added the code to use
> the properties maven.jxr.destdir and maven.jxr.destdir.test.
> http://svn.apache.org/viewcvs.cgi/maven/maven-1/plugins/trunk/pmd/src/plugin-resources/pmd.jsl?r1=371741&r2=374776&diff_format=h
> There's a big block added in the middle of the file.
> Can't we try to apply it to the checkstyle plugin before the release ?
> Do you have the time to take a look at it or do you want that I try to
> fix it (perhaps before the end of the WE)
> Arnaud
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org