[m2] Checkstyle FileNotFoundException

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[m2] Checkstyle FileNotFoundException

Peter van de Hoef
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [m2] Checkstyle FileNotFoundException

Peter van de Hoef

> - 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [m2] Checkstyle FileNotFoundException

Brett Porter
output directory fixed for next release.

- Brett

On 5/16/05, Peter van de Hoef <[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [m2] Checkstyle FileNotFoundException

Peter van de Hoef
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 <[hidden email]> 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: [hidden email]
>>For additional commands, e-mail: [hidden email]
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]