maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Alworth (JIRA)" <>
Subject [jira] Commented: (MPMD-89) Having an equivalent for auxclasspath option
Date Mon, 04 Oct 2010 17:11:33 GMT


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 (
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:
>             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
> 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:
For more information on JIRA, see:


View raw message