You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Pochat (JIRA)" <ji...@codehaus.org> on 2008/10/02 11:46:09 UTC

[jira] Created: (MPMD-89) Having an equivalent for auxclasspath option

Having an equivalent for auxclasspath option
--------------------------------------------

                 Key: MPMD-89
                 URL: http://jira.codehaus.org/browse/MPMD-89
             Project: Maven 2.x PMD Plugin
          Issue Type: New Feature
          Components: PMD
    Affects Versions: 2.4
         Environment: PMD 4.2.3
            Reporter: Benjamin Pochat


Hi,

PMD 4.2.3 introduced the option "auxclasspath" described as follows in the PMD help :
"-auxclasspath: specifies the classpath for libraries used by the source code (used by type resolution)"

Currently, there seems to be no way to use this very useful option in the PMD maven2 plugin.
I either found no workaround to deal with type resolution inside the project that has just been built through the compile maven goal.

This would be great !

Benjamin

-- 
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-89) Having an equivalent for auxclasspath option

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=219607#action_219607 ] 

Herve Boutemy commented on MPMD-89:
-----------------------------------

can you provide an unit test, showing a different result when this option is used and when it is not used?

> Having an equivalent for auxclasspath option
> --------------------------------------------
>
>                 Key: MPMD-89
>                 URL: http://jira.codehaus.org/browse/MPMD-89
>             Project: Maven 2.x PMD Plugin
>          Issue Type: New Feature
>          Components: PMD
>    Affects Versions: 2.4
>         Environment: PMD 4.2.3
>            Reporter: Benjamin Pochat
>
> Hi,
> PMD 4.2.3 introduced the option "auxclasspath" described as follows in the PMD help :
> "-auxclasspath: specifies the classpath for libraries used by the source code (used by type resolution)"
> Currently, there seems to be no way to use this very useful option in the PMD maven2 plugin.
> I either found no workaround to deal with type resolution inside the project that has just been built through the compile maven goal.
> This would be great !
> Benjamin

-- 
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] (MPMD-89) Having an equivalent for auxclasspath option

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

Benjamin Bentmann updated MPMD-89:
----------------------------------

    Attachment: MPMD-89.patch

That might do.
                
> Having an equivalent for auxclasspath option
> --------------------------------------------
>
>                 Key: MPMD-89
>                 URL: https://jira.codehaus.org/browse/MPMD-89
>             Project: Maven 2.x PMD Plugin
>          Issue Type: New Feature
>          Components: PMD
>    Affects Versions: 2.4
>         Environment: PMD 4.2.3
>            Reporter: Benjamin Pochat
>         Attachments: MPMD-89.patch
>
>
> Hi,
> PMD 4.2.3 introduced the option "auxclasspath" described as follows in the PMD help :
> "-auxclasspath: specifies the classpath for libraries used by the source code (used by type resolution)"
> Currently, there seems to be no way to use this very useful option in the PMD maven2 plugin.
> I either found no workaround to deal with type resolution inside the project that has just been built through the compile maven goal.
> This would be great !
> Benjamin

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MPMD-89) Having an equivalent for auxclasspath option

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

Olivier Lamy commented on MPMD-89:
----------------------------------

sounds good.
Feel free to apply it yourself :-)
                
> Having an equivalent for auxclasspath option
> --------------------------------------------
>
>                 Key: MPMD-89
>                 URL: https://jira.codehaus.org/browse/MPMD-89
>             Project: Maven 2.x PMD Plugin
>          Issue Type: New Feature
>          Components: PMD
>    Affects Versions: 2.4
>         Environment: PMD 4.2.3
>            Reporter: Benjamin Pochat
>         Attachments: MPMD-89.patch
>
>
> Hi,
> PMD 4.2.3 introduced the option "auxclasspath" described as follows in the PMD help :
> "-auxclasspath: specifies the classpath for libraries used by the source code (used by type resolution)"
> Currently, there seems to be no way to use this very useful option in the PMD maven2 plugin.
> I either found no workaround to deal with type resolution inside the project that has just been built through the compile maven goal.
> This would be great !
> Benjamin

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MPMD-89) Having an equivalent for auxclasspath option

Posted by "Colin Alworth (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MPMD-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=237397#action_237397 ] 

Colin Alworth commented on MPMD-89:
-----------------------------------

I don't yet have a unit test, but the use case is that you want PMD to analyze the classes themselves in addition to the AST. Type resolution uses the auxclasspath parameter to make not just the source but the classes available on the JVM. 

My use case is that we have specific rules about how a class may be used, and we are trying to enforce these by way of a rule. Every subclass of a given class may provide several methods which may be called via reflection remotely. The goal of this tests is to statically ensure that only legal methods are called.

Another example of how this can be helpful is the built in abstract junit rule (http://pmd.sourceforge.net/xref/net/sourceforge/pmd/rules/junit/AbstractJUnitRule.html). This checks, (among other things) whether the test is written to junit version 3 or 4, and allows subclasses to ask if a given method is a test method. This is not possible for JUnit 3 tests classes if the test class cannot be inspected to see if it extends TestCase.

> Having an equivalent for auxclasspath option
> --------------------------------------------
>
>                 Key: MPMD-89
>                 URL: http://jira.codehaus.org/browse/MPMD-89
>             Project: Maven 2.x PMD Plugin
>          Issue Type: New Feature
>          Components: PMD
>    Affects Versions: 2.4
>         Environment: PMD 4.2.3
>            Reporter: Benjamin Pochat
>
> Hi,
> PMD 4.2.3 introduced the option "auxclasspath" described as follows in the PMD help :
> "-auxclasspath: specifies the classpath for libraries used by the source code (used by type resolution)"
> Currently, there seems to be no way to use this very useful option in the PMD maven2 plugin.
> I either found no workaround to deal with type resolution inside the project that has just been built through the compile maven goal.
> This would be great !
> Benjamin

-- 
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] (MPMD-89) Having an equivalent for auxclasspath option

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

Benjamin Bentmann closed MPMD-89.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0
         Assignee: Benjamin Bentmann

Added {{typeResolution}} parameter in [r1439834|http://svn.apache.org/viewvc?view=revision&revision=1439834].
                
> Having an equivalent for auxclasspath option
> --------------------------------------------
>
>                 Key: MPMD-89
>                 URL: https://jira.codehaus.org/browse/MPMD-89
>             Project: Maven 2.x PMD Plugin
>          Issue Type: New Feature
>          Components: PMD
>    Affects Versions: 2.4
>         Environment: PMD 4.2.3
>            Reporter: Benjamin Pochat
>            Assignee: Benjamin Bentmann
>             Fix For: 3.0
>
>         Attachments: MPMD-89.patch
>
>
> Hi,
> PMD 4.2.3 introduced the option "auxclasspath" described as follows in the PMD help :
> "-auxclasspath: specifies the classpath for libraries used by the source code (used by type resolution)"
> Currently, there seems to be no way to use this very useful option in the PMD maven2 plugin.
> I either found no workaround to deal with type resolution inside the project that has just been built through the compile maven goal.
> This would be great !
> Benjamin

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira