[ http://jira.codehaus.org/browse/MCHECKSTYLE-17?page=all ]
     
fabrizio giustina closed MCHECKSTYLE-17:
----------------------------------------

      Assign To: fabrizio giustina
     Resolution: Cannot Reproduce
    Fix Version: 2.0-beta-2

Skipping the report generation if a src directory doesn't exist (without 
throwing an error) is exactly the current behavior of the plugin, the 
canGenerateReport() does exactly that (if it returns false no report is 
generated).
If you remove the "sourceDirectory.exists()" check in canGenerateReport() the 
link to the checkstyle report will always show up in the menu.

     public boolean canGenerateReport()
     {
         // TODO: would be good to scan the files here
-        return super.canGenerateReport() && sourceDirectory.exists();



> checkstyle plugin should skip generating reports if no sources exist (patch 
> included)
> -------------------------------------------------------------------------------------
>
>          Key: MCHECKSTYLE-17
>          URL: http://jira.codehaus.org/browse/MCHECKSTYLE-17
>      Project: Maven 2.x Checkstyle Plugin
>         Type: Bug

>     Reporter: Christian Schulte
>     Assignee: fabrizio giustina
>     Priority: Trivial
>      Fix For: 2.0-beta-2
>  Attachments: patch
>
>
> In order to be able to configure the checkstyle plugin in the root pom of a 
> multi-module build the plugin should not throw an exception because of the 
> non-existent src/main/java directory. for packaging pom. I would say that it 
> is not a failure to add the checkstyle plugin into the root pom without 
> having sourcecode therein. The attached patch will simply skip the report 
> generation for non-existent source directories.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to