[ http://jira.codehaus.org/browse/MNG-587?page=comments#action_47861 ] 

Karsten Blees commented on MNG-587:
-----------------------------------

What about simply loading the ruleset from file or URL? No need to mess with 
classpaths or packaging config files into jars.

The format property could be used for this:
if format = sun|avalon|turbine -> load from plugin classpath
if format contains protocol separator (":") -> load from URL
otherwise load from file (relative to POM)

BTW, specifying checkstyle reports in the parent POM is not much use, because 
the plugin throws an exception if there is no java source (i.e. when applied to 
a <packaging>pom</packaging> project).

> Add support for custom ruleset in maven-checkstyle-plugin
> ---------------------------------------------------------
>
>          Key: MNG-587
>          URL: http://jira.codehaus.org/browse/MNG-587
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-checkstyle-plugin
>     Versions: 2.0-alpha-3
>  Environment: Maven 2.0-alpha-3, WinXP SP2, Java 1.5.0_02
>     Reporter: John Fallows
>     Priority: Minor
>      Fix For: 2.0-beta-4

>
>
> Currently, there is no way to supply a custom ruleset for the 
> maven-checkstyle-plugin.
> A custom ruleset is likely to span multiple projects, and it doesn't make 
> sense to duplicate the custom ruleset file in each project.
> Perhaps we could customize the maven-checkstyle-report plugin via ClassLoader 
> resource, so that a common dependency JAR (containing the custom ruleset 
> definition) could be included on the classpath by a parent POM, while the 
> same parent POM could be used to configure the maven-checkstyle-report 
> (pointing to the location of the custom ruleset definition inside the JAR as 
> a classpath resource).  This assumes that the report plugin has a parameter 
> such as "configResourcePath".
> Perhaps we also need a src/plugin/resources directory so that such a 
> classpath-based resource scheme could still work inside a single project.  
> The "plugin/resources" would be on the classpath during plugin execution 
> only, and would not contribute to either compilation or test classpaths.

-- 
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