You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Subhash Chandran (JIRA)" <ji...@codehaus.org> on 2006/03/24 03:36:11 UTC

[jira] Created: (MPMD-22) PMD plugin should accept dependency entries

PMD plugin <configuration> should accept dependency entries
-----------------------------------------------------------

         Key: MPMD-22
         URL: http://jira.codehaus.org/browse/MPMD-22
     Project: Maven 2.x Pmd Plugin
        Type: New Feature

    Reporter: Subhash Chandran


As described here:

http://maven.apache.org/plugins/maven-pmd-plugin/howto.html

The PMD plugin supports configuration of custom ruleset XML files. But in our organization, we have written custom ruleset XMLs that refer Java classes (our PMD extension dependencies). The configuration of the PMD plugin should allow these dependencies to be specified.

Since we do not have this feature in the current release, we at our organization are forced to maintain a fork of the PMD plugin with the necessary dependencies added.

A suggested format:

<configuration>
    <rulesets>
        <ruleset>/rulesets/basic.xml</ruleset>
        <ruleset>/rulesets/controversial.xml</ruleset>
        <ruleset>d:\rulesets\strings.xml</ruleset>
        <ruleset>http://localhost/design.xml</ruleset>
    </rulesets>
{color:red}
<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.0</version>
    <scope>test</scope>
</dependency>
{color}
    <format>xml</format>
    <linkXref>true</linkXref>
    <sourceEncoding>utf-8</sourceEncoding>
    <minimumTokens>100</minimumTokens>
</configuration>

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


[jira] Commented: (MPMD-22) PMD plugin should accept dependency entries

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-22?page=comments#action_61840 ] 

Brett Porter commented on MPMD-22:
----------------------------------

one workaround to try is putting the dependency on the site plugin in the build section.

> PMD plugin <configuration> should accept dependency entries
> -----------------------------------------------------------
>
>          Key: MPMD-22
>          URL: http://jira.codehaus.org/browse/MPMD-22
>      Project: Maven 2.x Pmd Plugin
>         Type: New Feature

>     Reporter: Subhash Chandran

>
>
> As described here:
> http://maven.apache.org/plugins/maven-pmd-plugin/howto.html
> The PMD plugin supports configuration of custom ruleset XML files. But in our organization, we have written custom ruleset XMLs that refer Java classes (our PMD extension dependencies). The configuration of the PMD plugin should allow these dependencies to be specified.
> Since we do not have this feature in the current release, we at our organization are forced to maintain a fork of the PMD plugin with the necessary dependencies added.
> A suggested format:
> <configuration>
>     <rulesets>
>         <ruleset>/rulesets/basic.xml</ruleset>
>         <ruleset>/rulesets/controversial.xml</ruleset>
>         <ruleset>d:\rulesets\strings.xml</ruleset>
>         <ruleset>http://localhost/design.xml</ruleset>
>     </rulesets>
> {color:red}
> <dependency>
>     <groupId>junit</groupId>
>     <artifactId>junit</artifactId>
>     <version>4.0</version>
>     <scope>test</scope>
> </dependency>
> {color}
>     <format>xml</format>
>     <linkXref>true</linkXref>
>     <sourceEncoding>utf-8</sourceEncoding>
>     <minimumTokens>100</minimumTokens>
> </configuration>

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


[jira] Commented: (MPMD-22) PMD plugin should accept dependency entries

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-22?page=comments#action_61838 ] 

Carlos Sanchez commented on MPMD-22:
------------------------------------

It worked since 2.0

http://maven.apache.org/ref/2.0.3-SNAPSHOT/maven-model/maven.html

<build>
    <plugins>
      <plugin>
        <groupId/>
        <artifactId/>
        <version/>
        <dependencies>
          <dependency>
            <groupId/>
            <artifactId/>
            <version/>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>

> PMD plugin <configuration> should accept dependency entries
> -----------------------------------------------------------
>
>          Key: MPMD-22
>          URL: http://jira.codehaus.org/browse/MPMD-22
>      Project: Maven 2.x Pmd Plugin
>         Type: New Feature

>     Reporter: Subhash Chandran

>
>
> As described here:
> http://maven.apache.org/plugins/maven-pmd-plugin/howto.html
> The PMD plugin supports configuration of custom ruleset XML files. But in our organization, we have written custom ruleset XMLs that refer Java classes (our PMD extension dependencies). The configuration of the PMD plugin should allow these dependencies to be specified.
> Since we do not have this feature in the current release, we at our organization are forced to maintain a fork of the PMD plugin with the necessary dependencies added.
> A suggested format:
> <configuration>
>     <rulesets>
>         <ruleset>/rulesets/basic.xml</ruleset>
>         <ruleset>/rulesets/controversial.xml</ruleset>
>         <ruleset>d:\rulesets\strings.xml</ruleset>
>         <ruleset>http://localhost/design.xml</ruleset>
>     </rulesets>
> {color:red}
> <dependency>
>     <groupId>junit</groupId>
>     <artifactId>junit</artifactId>
>     <version>4.0</version>
>     <scope>test</scope>
> </dependency>
> {color}
>     <format>xml</format>
>     <linkXref>true</linkXref>
>     <sourceEncoding>utf-8</sourceEncoding>
>     <minimumTokens>100</minimumTokens>
> </configuration>

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


[jira] Commented: (MPMD-22) PMD plugin should accept dependency entries

Posted by "Carlos Sanchez (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-22?page=comments#action_61832 ] 

Carlos Sanchez commented on MPMD-22:
------------------------------------

Have you tried setting <dependencies> inside <plugin>
That's how it should work



> PMD plugin <configuration> should accept dependency entries
> -----------------------------------------------------------
>
>          Key: MPMD-22
>          URL: http://jira.codehaus.org/browse/MPMD-22
>      Project: Maven 2.x Pmd Plugin
>         Type: New Feature

>     Reporter: Subhash Chandran

>
>
> As described here:
> http://maven.apache.org/plugins/maven-pmd-plugin/howto.html
> The PMD plugin supports configuration of custom ruleset XML files. But in our organization, we have written custom ruleset XMLs that refer Java classes (our PMD extension dependencies). The configuration of the PMD plugin should allow these dependencies to be specified.
> Since we do not have this feature in the current release, we at our organization are forced to maintain a fork of the PMD plugin with the necessary dependencies added.
> A suggested format:
> <configuration>
>     <rulesets>
>         <ruleset>/rulesets/basic.xml</ruleset>
>         <ruleset>/rulesets/controversial.xml</ruleset>
>         <ruleset>d:\rulesets\strings.xml</ruleset>
>         <ruleset>http://localhost/design.xml</ruleset>
>     </rulesets>
> {color:red}
> <dependency>
>     <groupId>junit</groupId>
>     <artifactId>junit</artifactId>
>     <version>4.0</version>
>     <scope>test</scope>
> </dependency>
> {color}
>     <format>xml</format>
>     <linkXref>true</linkXref>
>     <sourceEncoding>utf-8</sourceEncoding>
>     <minimumTokens>100</minimumTokens>
> </configuration>

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


[jira] Commented: (MPMD-22) PMD plugin should accept dependency entries

Posted by "Subhash Chandran (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-22?page=comments#action_61847 ] 

Subhash Chandran commented on MPMD-22:
--------------------------------------

I have located the core issue: 

http://jira.codehaus.org/browse/MNG-2173

Can this issue be linked to that one, or should this one be closed?

> PMD plugin <configuration> should accept dependency entries
> -----------------------------------------------------------
>
>          Key: MPMD-22
>          URL: http://jira.codehaus.org/browse/MPMD-22
>      Project: Maven 2.x Pmd Plugin
>         Type: New Feature

>     Reporter: Subhash Chandran

>
>
> As described here:
> http://maven.apache.org/plugins/maven-pmd-plugin/howto.html
> The PMD plugin supports configuration of custom ruleset XML files. But in our organization, we have written custom ruleset XMLs that refer Java classes (our PMD extension dependencies). The configuration of the PMD plugin should allow these dependencies to be specified.
> Since we do not have this feature in the current release, we at our organization are forced to maintain a fork of the PMD plugin with the necessary dependencies added.
> A suggested format:
> <configuration>
>     <rulesets>
>         <ruleset>/rulesets/basic.xml</ruleset>
>         <ruleset>/rulesets/controversial.xml</ruleset>
>         <ruleset>d:\rulesets\strings.xml</ruleset>
>         <ruleset>http://localhost/design.xml</ruleset>
>     </rulesets>
> {color:red}
> <dependency>
>     <groupId>junit</groupId>
>     <artifactId>junit</artifactId>
>     <version>4.0</version>
>     <scope>test</scope>
> </dependency>
> {color}
>     <format>xml</format>
>     <linkXref>true</linkXref>
>     <sourceEncoding>utf-8</sourceEncoding>
>     <minimumTokens>100</minimumTokens>
> </configuration>

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


[jira] Commented: (MPMD-22) PMD plugin should accept dependency entries

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-22?page=comments#action_61839 ] 

Brett Porter commented on MPMD-22:
----------------------------------

It's a known issue that <reporting> doesn't. The bug is in core, and checkstyle has a similar issue.

> PMD plugin <configuration> should accept dependency entries
> -----------------------------------------------------------
>
>          Key: MPMD-22
>          URL: http://jira.codehaus.org/browse/MPMD-22
>      Project: Maven 2.x Pmd Plugin
>         Type: New Feature

>     Reporter: Subhash Chandran

>
>
> As described here:
> http://maven.apache.org/plugins/maven-pmd-plugin/howto.html
> The PMD plugin supports configuration of custom ruleset XML files. But in our organization, we have written custom ruleset XMLs that refer Java classes (our PMD extension dependencies). The configuration of the PMD plugin should allow these dependencies to be specified.
> Since we do not have this feature in the current release, we at our organization are forced to maintain a fork of the PMD plugin with the necessary dependencies added.
> A suggested format:
> <configuration>
>     <rulesets>
>         <ruleset>/rulesets/basic.xml</ruleset>
>         <ruleset>/rulesets/controversial.xml</ruleset>
>         <ruleset>d:\rulesets\strings.xml</ruleset>
>         <ruleset>http://localhost/design.xml</ruleset>
>     </rulesets>
> {color:red}
> <dependency>
>     <groupId>junit</groupId>
>     <artifactId>junit</artifactId>
>     <version>4.0</version>
>     <scope>test</scope>
> </dependency>
> {color}
>     <format>xml</format>
>     <linkXref>true</linkXref>
>     <sourceEncoding>utf-8</sourceEncoding>
>     <minimumTokens>100</minimumTokens>
> </configuration>

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


[jira] Commented: (MPMD-22) PMD plugin should accept dependency entries

Posted by "Arnaud Heritier (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-22?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=141978#action_141978 ] 

Arnaud Heritier commented on MPMD-22:
-------------------------------------

It's working (for now) to add it as an extension because it adds it in a classloader available for maven's core and plugins but it's not something that we would like to recommand.
Extensions mechanism is used to add new functionnalities in maven and not to share data between plugins.
We prefer that you add this dependency in the plugin dependency :
{code:xml}
<build>
 <plugins>
  <plugin>
   <artifactId>maven-pmd-plugin</artifactId>
   <dependencies>
    <dependency>
     <groupId>cz.aspectworks</groupId>
     <artifactId>cz.aspectworks.build</artifactId>
     <version>0.2.0</version>
    </dependency>
   </dependencies>
  </plugin>
 </plugins>
</build>
{code}

> PMD plugin <configuration> should accept dependency entries
> -----------------------------------------------------------
>
>                 Key: MPMD-22
>                 URL: http://jira.codehaus.org/browse/MPMD-22
>             Project: Maven 2.x PMD Plugin
>          Issue Type: New Feature
>            Reporter: Subhash Chandran
>
> As described here:
> http://maven.apache.org/plugins/maven-pmd-plugin/howto.html
> The PMD plugin supports configuration of custom ruleset XML files. But in our organization, we have written custom ruleset XMLs that refer Java classes (our PMD extension dependencies). The configuration of the PMD plugin should allow these dependencies to be specified.
> Since we do not have this feature in the current release, we at our organization are forced to maintain a fork of the PMD plugin with the necessary dependencies added.
> A suggested format:
> <configuration>
>     <rulesets>
>         <ruleset>/rulesets/basic.xml</ruleset>
>         <ruleset>/rulesets/controversial.xml</ruleset>
>         <ruleset>d:\rulesets\strings.xml</ruleset>
>         <ruleset>http://localhost/design.xml</ruleset>
>     </rulesets>
> {color:red}
> <dependency>
>     <groupId>junit</groupId>
>     <artifactId>junit</artifactId>
>     <version>4.0</version>
>     <scope>test</scope>
> </dependency>
> {color}
>     <format>xml</format>
>     <linkXref>true</linkXref>
>     <sourceEncoding>utf-8</sourceEncoding>
>     <minimumTokens>100</minimumTokens>
> </configuration>

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

        

[jira] Commented: (MPMD-22) PMD plugin should accept dependency entries

Posted by "Pavel Muller (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-22?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=138308#action_138308 ] 

Pavel Muller commented on MPMD-22:
----------------------------------

I use the following approach and it works fine:

<build>
<extensions>
<extension>
<groupId>cz.aspectworks</groupId>
<artifactId>cz.aspectworks.build</artifactId>
<version>0.2.0</version>
</extension>
</extensions>
[SNIP]

I've got my PMD and checkstyle config files on classpath.

> PMD plugin <configuration> should accept dependency entries
> -----------------------------------------------------------
>
>                 Key: MPMD-22
>                 URL: http://jira.codehaus.org/browse/MPMD-22
>             Project: Maven 2.x PMD Plugin
>          Issue Type: New Feature
>            Reporter: Subhash Chandran
>
> As described here:
> http://maven.apache.org/plugins/maven-pmd-plugin/howto.html
> The PMD plugin supports configuration of custom ruleset XML files. But in our organization, we have written custom ruleset XMLs that refer Java classes (our PMD extension dependencies). The configuration of the PMD plugin should allow these dependencies to be specified.
> Since we do not have this feature in the current release, we at our organization are forced to maintain a fork of the PMD plugin with the necessary dependencies added.
> A suggested format:
> <configuration>
>     <rulesets>
>         <ruleset>/rulesets/basic.xml</ruleset>
>         <ruleset>/rulesets/controversial.xml</ruleset>
>         <ruleset>d:\rulesets\strings.xml</ruleset>
>         <ruleset>http://localhost/design.xml</ruleset>
>     </rulesets>
> {color:red}
> <dependency>
>     <groupId>junit</groupId>
>     <artifactId>junit</artifactId>
>     <version>4.0</version>
>     <scope>test</scope>
> </dependency>
> {color}
>     <format>xml</format>
>     <linkXref>true</linkXref>
>     <sourceEncoding>utf-8</sourceEncoding>
>     <minimumTokens>100</minimumTokens>
> </configuration>

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

        

[jira] Commented: (MPMD-22) PMD plugin should accept dependency entries

Posted by "Subhash Chandran (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-22?page=comments#action_61833 ] 

Subhash Chandran commented on MPMD-22:
--------------------------------------

We tried that. We are getting this exception trace:

----------------------------start trace------------------------------

Reason: Parse error reading POM. Reason: Unrecognised tag: 'dependencies' (position: START_TAG seen ...</configuration>\n\n\t\t<dependencies>... @94:17)


[INFO] ----------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Parse error reading POM. Reason: Unrecognised tag: 'dependencies' (position: START_TAG seen ...</configuration>\n\n\t\t<dependencies>... @94:17)
        at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:365)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:278)


----------------------------end trace------------------------------

Note that we are trying this in M2.0.2 release. Is this <dependencies> support inside <plugin> part of the yet to be released M2.0.3?

> PMD plugin <configuration> should accept dependency entries
> -----------------------------------------------------------
>
>          Key: MPMD-22
>          URL: http://jira.codehaus.org/browse/MPMD-22
>      Project: Maven 2.x Pmd Plugin
>         Type: New Feature

>     Reporter: Subhash Chandran

>
>
> As described here:
> http://maven.apache.org/plugins/maven-pmd-plugin/howto.html
> The PMD plugin supports configuration of custom ruleset XML files. But in our organization, we have written custom ruleset XMLs that refer Java classes (our PMD extension dependencies). The configuration of the PMD plugin should allow these dependencies to be specified.
> Since we do not have this feature in the current release, we at our organization are forced to maintain a fork of the PMD plugin with the necessary dependencies added.
> A suggested format:
> <configuration>
>     <rulesets>
>         <ruleset>/rulesets/basic.xml</ruleset>
>         <ruleset>/rulesets/controversial.xml</ruleset>
>         <ruleset>d:\rulesets\strings.xml</ruleset>
>         <ruleset>http://localhost/design.xml</ruleset>
>     </rulesets>
> {color:red}
> <dependency>
>     <groupId>junit</groupId>
>     <artifactId>junit</artifactId>
>     <version>4.0</version>
>     <scope>test</scope>
> </dependency>
> {color}
>     <format>xml</format>
>     <linkXref>true</linkXref>
>     <sourceEncoding>utf-8</sourceEncoding>
>     <minimumTokens>100</minimumTokens>
> </configuration>

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


[jira] Closed: (MPMD-22) PMD plugin should accept dependency entries

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MPMD-22?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed MPMD-22.
----------------------------

    Resolution: Won't Fix
      Assignee: Olivier Lamy

> PMD plugin <configuration> should accept dependency entries
> -----------------------------------------------------------
>
>                 Key: MPMD-22
>                 URL: https://jira.codehaus.org/browse/MPMD-22
>             Project: Maven 2.x PMD Plugin
>          Issue Type: New Feature
>            Reporter: Subhash Chandran
>            Assignee: Olivier Lamy
>
> As described here:
> http://maven.apache.org/plugins/maven-pmd-plugin/howto.html
> The PMD plugin supports configuration of custom ruleset XML files. But in our organization, we have written custom ruleset XMLs that refer Java classes (our PMD extension dependencies). The configuration of the PMD plugin should allow these dependencies to be specified.
> Since we do not have this feature in the current release, we at our organization are forced to maintain a fork of the PMD plugin with the necessary dependencies added.
> A suggested format:
> <configuration>
>     <rulesets>
>         <ruleset>/rulesets/basic.xml</ruleset>
>         <ruleset>/rulesets/controversial.xml</ruleset>
>         <ruleset>d:\rulesets\strings.xml</ruleset>
>         <ruleset>http://localhost/design.xml</ruleset>
>     </rulesets>
> {color:red}
> <dependency>
>     <groupId>junit</groupId>
>     <artifactId>junit</artifactId>
>     <version>4.0</version>
>     <scope>test</scope>
> </dependency>
> {color}
>     <format>xml</format>
>     <linkXref>true</linkXref>
>     <sourceEncoding>utf-8</sourceEncoding>
>     <minimumTokens>100</minimumTokens>
> </configuration>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira