You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "John Fallows (JIRA)" <ji...@codehaus.org> on 2005/07/14 00:50:57 UTC

[jira] Created: (MNG-587) Add support for custom ruleset in maven-checkstyle-plugin

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-plugins  
    Versions: 2.0-alpha-3    
 Environment: Maven 2.0-alpha-3, WinXP SP2, Java 1.5.0_02
 Reporter: John Fallows


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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-587) Add support for custom ruleset in maven-checkstyle-plugin

Posted by "Mario Van Steenberghe (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-587?page=comments#action_49312 ] 

Mario Van Steenberghe commented on MNG-587:
-------------------------------------------

Currently, it is not possible in any way to specify your own custom checkstyle configuration file.

Wouldn't it be possible to add the configurationFile as a property ? If this property is not set (null), then the default rules apply: check the format to use a default configuration file. Otherwise use the user-defined configuration file. 

This code change would be very minimal, all you'll need to do is add the property and change the getConfigFile() method.

Mario.

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

>
>
> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-587) Add support for custom ruleset in maven-checkstyle-plugin

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-587?page=comments#action_52267 ] 

John Casey commented on MNG-587:
--------------------------------

what exactly is the difference between this and MNG-1113?

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

>
>
> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Updated: (MNG-587) Add support for custom ruleset in maven-checkstyle-plugin

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-587?page=all ]

Brett Porter updated MNG-587:
-----------------------------

    Fix Version: 2.0-beta-2
      Component:     (was: maven-plugins)
                 maven-checkstyle-plugin

> 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
>      Fix For: 2.0-beta-2

>
>
> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-587) Add support for custom ruleset in maven-checkstyle-plugin

Posted by "Dave Sag (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-587?page=comments#action_48011 ] 

Dave Sag commented on MNG-587:
------------------------------

isn't this what the 'propertiesFile' and 'propertiesURL' params are for?

just provide the rules as a URL and there you go.  the plugin could be clever and cache it for offline work.

dave


> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Closed: (MNG-587) Add support for custom ruleset in maven-checkstyle-plugin

Posted by "John Casey (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-587?page=all ]
     
John Casey closed MNG-587:
--------------------------

     Assign To: John Casey
    Resolution: Fixed

should have been fixed by MNG-1113

> 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
>     Assignee: John Casey
>     Priority: Minor
>      Fix For: 2.0.1

>
>
> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-587) Add support for custom ruleset in maven-checkstyle-plugin

Posted by "Karsten Blees (JIRA)" <ji...@codehaus.org>.
    [ 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org