• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

Running PMD coding standards checker on Maven Built code

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a mumtimodule project which I have set up using Maven 2.
Now I want to run PMD code checker on the same using eclipse. But I am not able to do that.

Please let me know if anyone has some idea about the same
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ItDoesntWorkIsUseless... I run PMD on Maven projects with no issues.

Are you trying to run it from within Eclipse?
 
Bond Simply
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not even able to configure it.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Configure what? PMD? How did you install it? What are you trying to configure?
 
Bond Simply
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
actually I have maven 2 working fine with eclipse
I rightclick on the Pom.xml and generate a War file

Now I want to use PMD to check standards for the same code. But not able to get how to use PMD with Maven generated code.

 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That'd depend on where Maven is generating the source code; do you have that directory as an Eclipse source directory? I don't remember how PMD chooses which directories to scan--if it uses working sets just create a working set that includes the generated source directory.

In general, however, you don't want to check generated source: that source lies outsides of your control, unless you're modifying the mechanism used to generate the code. If you *are* going to check the generated code I'd also recommend running FindBugs on it.
 
Wanna see my flashlight? How about this tiny ad?
Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders
https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing
reply
    Bookmark Topic Watch Topic
  • New Topic