Menu ▾ ▴

#1182 Ant task uses wrong default classpath

New Tickets
wont-fix
nobody
None
PMD
3-Major
Bug
5.0.5-1
2014-08-21
2014-04-06
No

It used to be that when using PMD via Ant it would automatically use the build/ subdir of the project's top level directory, defined in Ant property build.dir, as the classpath for the classes to analyze. But now it uses the build project's top level directory as the classpath. According to the logging PMD outputs:

[pmd] FINE: Adding classpath entry: </home/matt/develop/Depths/JavaLike>

If I then use auxclasspath to specify ${build.dir} it works, but it didn't used to need that.

Strangely, the version of PMD I'm using (5.0.5-1) hasn't changed, so it might be that PMD was depending on buggy behaviour from a library that got fixed and I then updated. This includes:

ant-testutil
jaxen

Discussion

  • Matthew Cline

    Matthew Cline - 2014-04-06

    Oops! It looks like its not a bug (or at least not the bug I thought it was), since it generates the report HTML file just fine. I thought it was a problem because of a related (and yet to be filed) bug causing PMD to spit out all the FINE logging level log messages, which said stuff like:

    [pmd] Apr 06, 2014 3:51:02 PM net.sourceforge.pmd.lang.java.typeresolution.ClassTypeResolver visit
    [pmd] FINE: Could not find class javalike.backend.place.TestProps, due to: java.lang.ClassNotFoundException: javalike.backend.place.TestProps
    

    These messages would go away if I supplied the proper auxclasspath, but it didn't make any difference in the report generated.

     
  • Andreas Dangel

    Andreas Dangel - 2014-04-28
    • status: open --> wont-fix
     
  • Andreas Dangel

    Andreas Dangel - 2014-04-28

    Thanks for the clarification. I'll close this bug then.

    For reference, this is the other bug with the logging problem: [#1183]

     

    Related

    Issues: #1183


Log in to post a comment.