You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Peter van de Hoef <pv...@springsite.com> on 2005/05/15 21:13:24 UTC

[m2] Checkstyle FileNotFoundException

Hi all,

I am experimenting with the reporting features of m2 alpha-2 and get the following exception when running the 
maven-checkstyle-plugin:

Unable to save cache file
java.io.FileNotFoundException: target/checkstyle-cachefile (No such file or directory)
         at java.io.FileOutputStream.open(Native Method)
         at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
         at java.io.FileOutputStream.<init>(FileOutputStream.java:70)
         at com.puppycrawl.tools.checkstyle.PropertyCacheFile.destroy(PropertyCacheFile.java:114)
         at com.puppycrawl.tools.checkstyle.TreeWalker.destroy(TreeWalker.java:526)
         at com.puppycrawl.tools.checkstyle.Checker.process(Checker.java:288)
         at org.apache.maven.plugin.checkstyle.CheckstyleReport.execute(CheckstyleReport.java:194)
         at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:66)
         at org.apache.maven.doxia.DoxiaMojo.execute(DoxiaMojo.java:146)
         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415)
         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.processGoals(DefaultLifecycleExecutor.java:169)
         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:90)
         at org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:253)
         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:167)
         at org.apache.maven.cli.MavenCli.main(MavenCli.java:246)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:303)
         at org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)
         at org.codehaus.classworlds.Launcher.main(Launcher.java:363)

It appears that the plugin always expects its cachefile in the 'target' directory and does not look at the 
<build><directory> setting of the POM (which I have set to something other than 'target').
If I do not specify an output directory with the <build><directory> element, the output is written to the default 
'target' subdirectory and the plugin works fine.

BTW:
- Is this the correct place to ask questions about the checkstyle plugin, or does it have it's own mailing list?
- Where can I find the sources of these plugins? I'm very eager to learn about configuring them and, for now, the 
sources seem to be the best place to start.

Thank you very much,
Peter van de Hoef

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


Re: [m2] Checkstyle FileNotFoundException

Posted by Peter van de Hoef <pv...@springsite.com>.
Thanks again for all the good work!

Brett Porter wrote:
> output directory fixed for next release.
> 
> - Brett
> 
> On 5/16/05, Peter van de Hoef <pv...@springsite.com> wrote:
> 
>>>- Where can I find the sources of these plugins?
>>
>>Sorry, I was looking with my nose. I've found them under 'maven-reporting'.
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

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


Re: [m2] Checkstyle FileNotFoundException

Posted by Brett Porter <br...@gmail.com>.
output directory fixed for next release.

- Brett

On 5/16/05, Peter van de Hoef <pv...@springsite.com> wrote:
> 
> > - Where can I find the sources of these plugins?
> 
> Sorry, I was looking with my nose. I've found them under 'maven-reporting'.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

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


Re: [m2] Checkstyle FileNotFoundException

Posted by Peter van de Hoef <pv...@springsite.com>.
> - Where can I find the sources of these plugins?

Sorry, I was looking with my nose. I've found them under 'maven-reporting'.


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