Tony, pmd is a reporting plugin, not a build plugin.  It does not go in
<build>. 

-----Original Message-----
From: tony nys [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 18, 2006 4:11 AM
To: Maven Users List
Subject: Re: pmd plugin m2

Allen,

Sorry I didn't mention it but I had this already defined as plugin in
the build section in the pom file; <build>
<sourceDirectory>./src/main/java</sourceDirectory>
 <plugins>
<plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-pmd-plugin</artifactId>
 <configuration>
 <targetJdk>1.5</targetJdk>
 </configuration>
</plugin>



--- Allan Ramirez <[EMAIL PROTECTED]> wrote:

> The targetJdk is configurable. Try to set it on 1.5
> 
> <plugins>
>   <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-pmd-plugin</artifactId>
>       <configuration>
>            <targetJdk>1.5</targetJdk>
>       </configuration>
>   </plugin>
> </plugins>
> 
> Hope it works :)
> 
> -allan
> 
> tony nys wrote:
> 
> >Hi,
> >
> >I want to use java5 source code in m2 with the PMD plugin, but the 
> >PMD plugin returns an error saying that the code is not 1.4. This is 
> >true, but how do
> we
> >tell PMD to use 1.5 source code  ?
> >
> >I've seen the mojo has a targetJdk setting, but it
> is
> >not configurable.
> >
> >
> >Embedded error: Failure executing PMD for:
> >D:\eclipse\workspace\DirectoryScanner.java
> >Can't use JDK 1.5 for loop syntax when running in
> JDK
> >1.4 mode!
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Tired of spam?  Yahoo! Mail has the best spam
> protection around
> >http://mail.yahoo.com
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> >  
> >
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

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



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

Reply via email to