You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Carsten Karkola <ck...@mms-dresden.de> on 2006/05/18 13:11:56 UTC

checkstyle plugin and propertyExpansion

We have our own checkstyle config with some file references. I tried
to use them with

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
        <configLocation>${basedir}/../../checks.xml</configLocation>
          <propertyExpansion>
          header.regexp.file=${basedir}/../../header_regexp.txt
          </propertyExpansion>
        </configuration>
      </plugin>

this part of the pom is located in a supproject. Without the ${basedir} Maven didn't find the 
file header_regexp.txt if I call mvn site from the parent project. The ${basedir}-solution works 
fine on Unix (AIX) but fails on windows, where the directory separator is missed:

Embedded error: Error rendering Maven report: Failed during checkstyle configuration
d:ckkckk_nextTCdevcommonaxis\..\..\header_regexp.txt 

regards, carsten


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


Re: checkstyle plugin and propertyExpansion

Posted by Edwin Punzalan <ep...@exist.com>.

${basedir} has backslashes... and is parsed wrongly by:

    p.load( new StringInputStream( propertyExpansion ) );



Carsten Karkola wrote:
> We have our own checkstyle config with some file references. I tried
> to use them with
>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-checkstyle-plugin</artifactId>
>         <configuration>
>         <configLocation>${basedir}/../../checks.xml</configLocation>
>           <propertyExpansion>
>           header.regexp.file=${basedir}/../../header_regexp.txt
>           </propertyExpansion>
>         </configuration>
>       </plugin>
>
> this part of the pom is located in a supproject. Without the ${basedir} Maven didn't find the 
> file header_regexp.txt if I call mvn site from the parent project. The ${basedir}-solution works 
> fine on Unix (AIX) but fails on windows, where the directory separator is missed:
>
> Embedded error: Error rendering Maven report: Failed during checkstyle configuration
> d:ckkckk_nextTCdevcommonaxis\..\..\header_regexp.txt 
>
> regards, carsten
>
>
> ---------------------------------------------------------------------
> 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