Hi,

Thanks for that it worked. I referenced the ones in the plugin and it
worked.
A word of warning to anyone else though. If no <ruleset> tags are used,
the 
PMD software / plugin decides to give you an empty report. This isn't
mentioned in the docs

A


Rgds
Andy

-----Original Message-----
From: Mike Perham [mailto:[EMAIL PROTECTED] 
Sent: 05 July 2006 17:25
To: Maven Users List
Cc: [EMAIL PROTECTED]
Subject: RE: maven-pmd-plugin can't find my source files

It sounds like you are trying to use a ruleset from an older version and
the PMD code is no longer there to support the old rule(s).  Try
removing the rulesets and I bet it will work fine. 

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 05, 2006 11:10 AM
> To: users@maven.apache.org
> Cc: [EMAIL PROTECTED]
> Subject: FW: maven-pmd-plugin can't find my source files
> 
>  
> Hi Doug
> 
> I have installed PMD locally and executede against code; successfully 
> generating report.
> I have extracted a couple of the rulesets from the pmd-3.3.jar and 
> have the the plugin configured as follows ...
> 
>                       <plugin>
>       
> <groupId>org.apache.maven.plugins</groupId>
>       
> <artifactId>maven-pmd-plugin</artifactId>
>                               <configuration>
>                               <rulesets>
>       
> <ruleset>${basedir}/basic.xml</ruleset>
>       
> <ruleset>${basedir}/controversial.xml</ruleset>
>       
> <ruleset>${basedir}/favorites.xml</ruleset>
>       
> <ruleset>${basedir}/strings.xml</ruleset>
>       
> <ruleset>${basedir}/design.xml</ruleset>
>                               </rulesets>
>                               <format>xml</format>
>       
> <outputDirectory>${basedir}/target</outputDirectory>
>                               <failOnViolation>false</failOnViolation>
>                               <debug>true</debug>
>                                       <linkXRef>true</linkXRef>
>                               </configuration>
>                       </plugin>
> 
> This does now seem to be executing PMD - I can tell because it fails 
> with
> java.lang.RuntimeException: Couldn't find that class 
> net.sourceforge.pmd.rules.AvoidDuplicateLiteralsRule
> 
> Do I have to have pmd jar files on a classpath (or in repository and 
> have some dependencies set up) ?
> 
> Cheers
> Andy
> -----Original Message-----
> From: Davies, Andrew-A
> Sent: 04 July 2006 12:44
> To: 'Maven Users List'
> Subject: RE: maven-pmd-plugin can't find my source files
> 
> Sorry  about delayed response - been away 4 a couple of days.
> No using JDK 1.4.2. Will try PMD alone to confirm, then try specific 
> version.
> 
> Will vote if I see
> 
> Rgds
> Andy
>  
> 
> -----Original Message-----
> From: Doug Douglass [mailto:[EMAIL PROTECTED]
> Sent: 29 June 2006 18:33
> To: Maven Users List
> Subject: Re: maven-pmd-plugin can't find my source files
> 
> Sorry, I mis-spoke on the version, we were originally using 
> 2.0-beta-2-SNAPSHOT hosted at either:
> 
>   * http://snapshots.maven.codehaus.org/maven2
>   * http://cvs.apache.org/maven-snapshot-repository
> 
> You're classes don't happen to be using Java 5 and Generics do they?
> 
> You'll need to configure the plugin if you're using java 5 (see 
> targetJdk parameter).
> 
> If you want to try 2.0-beta-2-SNAPSHOT, add the appropriate location 
> above to your pom as a pluginRepository and then add a version tag 
> where ever you reference the pmd plugin groupId/artifactId.
> 
> Lastly, a good test of whether the problem is related to the plugin or

> to pmd, is to install pmd and run it directly -- my bet is you'll see 
> a bunch of NPEs reported.
> 
> 
> FYI, the 2.1-SNAPSHOT we use is deployed to our corp. plugin repo 
> pending acceptance of http://jira.codehaus.org/browse/MPMD-33 which is

> unrelated to your problems. If you do see the NPEs noted above, vote 
> for this issue ;)
> 
> HTH,
> Doug
> 
> On 6/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > I haven't specified a version. My POM looks like
> >
> >         <reporting>
> >                 <plugins>
> >                         <plugin>
> >
> > <groupId>org.apache.maven.plugins</groupId>
> >
> > <artifactId>maven-pmd-plugin</artifactId>
> >                                 <configuration>
> >                                         <linkXRef>true</linkXRef>
> >                                 </configuration>
> >                         </plugin>
> >                         <plugin>
> >
> > <groupId>org.apache.maven.plugins</groupId>
> >
> > <artifactId>maven-jxr-plugin</artifactId>
> >                         </plugin>
> >                 </plugins>
> >         </reporting>
> >
> >
> >
> > -----Original Message-----
> > From: Doug Douglass [mailto:[EMAIL PROTECTED]
> > Sent: 29 June 2006 13:39
> > To: Maven Users List
> > Subject: Re: maven-pmd-plugin can't find my source files
> >
> > What version of the plugin? We've been using 2.1-SNAPSHOT for many 
> > months and haven't seen the problems you describe.
> >
> > On 6/29/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > >
> > > Heiko,
> > >
> > > I have the same issue. Except that only a blank page is created.
> > >
> > >     <plugin>
> > >       <groupId>org.apache.maven.plugins</groupId>
> > >       <artifactId>maven-pmd-plugin</artifactId>
> > >     </plugin>
> > >
> > > I also use JXR for cross referencing java
> > >
> > >                         <plugin>
> > >
> > > <groupId>org.apache.maven.plugins</groupId>
> > >
> > > <artifactId>maven-jxr-plugin</artifactId>
> > >                         </plugin>
> > >
> > > Either I am missing something fundamental, or the
> documentation on
> > > http://maven.apache.org/plugins/maven-pmd-plugin/howto.html
> > > is wrong. Or there are bugs with the plugin.
> > >
> > > Rgds
> > > Andy
> > >
> > > -----Original Message-----
> > > From: Heiko Wolf [mailto:[EMAIL PROTECTED] ]
> > > Sent: 29 June 2006 07:58
> > > To: users@maven.apache.org
> > > Subject: maven-pmd-plugin can't find my source files
> > >
> > > Hello,
> > >
> > > I have a very little maven project (only one source
> file), sources
> > > as usual in src/main/java, everything works fine, mvn
> compile, mvn
> > > site and so on. But not mvn pmd:pmd.  It generates some files 
> > > (target/basic.xml, target/unusedcode.xml ...), pmd.xml is also 
> > > generated, but its nearly empty. It contains only an pmd-tag, 
> > > nothing more. I try to integrate the pmd-plugin in my
> site-report,
> > > which seems
> >
> > > to work because pmd-sites are generateded, but they are useless 
> > > because the file-section is empty. The maven-pmd-plugin
> is unable to
> 
> > > find my source code, I think, but why? I also tried the 
> > > checkstyle-plugin, which just works fine as expected without any 
> > > special treatment. Any suggestions how I can figure out
> the problem?
> > Here is the output of the command:
> > >
> > > #mvn -e pmd:pmd
> > > + Error stacktraces are turned on.
> > > [INFO] Scanning for projects...
> > > [INFO] Searching repository for plugin with prefix: 'pmd'.
> > > [INFO]
> > > 
> --------------------------------------------------------------------
> > > --
> > > --
> > > ----
> > > [INFO] Building InquiryPortlet
> > > [INFO]    task-segment: [pmd:pmd]
> > > [INFO]
> > > 
> --------------------------------------------------------------------
> > > --
> > > --
> > > ----
> > > [INFO] [pmd:pmd]
> > > [WARNING] Unable to locate Source XRef to link to -
> DISABLED [INFO]
> > > 
> --------------------------------------------------------------------
> > > --
> > > --
> > > [INFO] BUILD SUCCESSFUL
> > > [INFO]
> > > 
> --------------------------------------------------------------------
> > > --
> > > --
> > > [INFO] Total time: 9 seconds
> > > [INFO] Finished at: Thu Jun 29 08:53:31 CEST 2006 [INFO] Final
> Memory:
> > > 4M/108M [INFO]
> > > 
> --------------------------------------------------------------------
> > > --
> > > --
> > >
> > > As far as I know, the warning has nothing to do with my problem.
> > >
> > > Is there any way to point the maven-pmd-plugin to the
> source files?
> > > But I thought, this is unnecessary if my source files are on 
> > > standard location.
> > >
> > >
> > > Regards
> > >
> > > Heiko Wolf
> > > --
> > >
> > >
> > > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> > > Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> > >

Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to