Thanks again for supporting, Mike.
I've just tried # 2 before receiving your e-mail, and it fixed the
Nullpointer.

Now I can move on :-)

Tiago

On 4/25/06, Mike Perham <[EMAIL PROTECTED]> wrote:
>
> Correct.  The article is wrong.  Maven doesn't complain because different
> goals (e.g. pmd and cpd) can share the same config so there's no way to
> differ between an error and config that is designed to be used by another
> goal in the plugin.
>
> Your new error is caused by a bug in PMD, not the plugin.  You have three
> options:
>
> 1) Refactor your source to work around the parsing bug.
> 2) Compile the SVN head of the PMD plugin since it now uses PMD 3.6.
> 3) Modify the PMD plugin pom in your local repository to use 3.6 instead
> of 3.4.  I'm not positive this will work since 3.6 might not be binary
> compatible with 3.4.
>
> (3) is the quickest and easiest to determine if 3.6 solves the
> problem.  The PMD plugin is due to be released sometime in the near future.
>
> mike
>
> -----Original Message-----
> From:   Tiago Fernandez [mailto:[EMAIL PROTECTED]
> Sent:   Mon 4/24/2006 7:29 PM
> To:     Maven Users List
> Cc:
> Subject:        Re: [m2.0.4] PMD enum and JDK 1.5
>
> Hum, interesting... so it must be:
>
> <targetJdk>1.5</targetJdk>
>
> I though it was right because I get this syntax from the article
> http://www.javaworld.com/javaworld/jw-02-2006/jw-0227-maven-p2.html, and
> plus Maven didn't complain about the wrong tag (targetjdk). Next time I'll
> check the documentation.
>
> Anyways, now another issue raised:
>
> [INFO] Error during report generation
>
> Embedded error: Failure executing PMD for:
>
> D:\workspace\tlf\foundation\gui\src\main\java\tlf\foundation\gui\LookAndFeel.java
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Error during
> report
> generation
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> (DefaultLifecycleExecutor
> .java:559)
>         at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
> (DefaultLifec
> ycleExecutor.java:475)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
> (DefaultLifecycleExecutor.
> java:454)
>         at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
> (DefaultL
> ifecycleExecutor.java:306)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments
> (DefaultLifecycleE
> xecutor.java:273)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java
> :140)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java
> :315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(
> Launcher.java
> :430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Error during
> report generation
>         at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java
> :389)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:412)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> (DefaultLifecycleExecutor
> .java:534)
>         ... 16 more
> Caused by: org.apache.maven.reporting.MavenReportException: Failure
> executing PMD for: D:\workspace\
> tlf\foundation\gui\src\main\java\tlf\foundation\gui\LookAndFeel.java
>         at org.apache.maven.plugin.pmd.PmdReport.executeReport(
> PmdReport.java:269)
>         at org.apache.maven.reporting.AbstractMavenReport.generate(
> AbstractMavenReport.java:98)
>         at org.apache.maven.plugins.site.SiteMojo.generateReportsPages(
> SiteMojo.java:802)
>         at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java
> :301)
>         ... 18 more
> Caused by: java.lang.NullPointerException
>         at net.sourceforge.pmd.ast.ASTFieldDeclaration.isInterfaceMember(
> ASTFieldDeclaration.java:77
> )
>         at net.sourceforge.pmd.ast.ASTFieldDeclaration.isFinal(
> ASTFieldDeclaration.java:49)
>         at net.sourceforge.pmd.rules.design.TooManyFields.visit(
> TooManyFields.java:36)
>         at net.sourceforge.pmd.AbstractRule.visitAll(AbstractRule.java
> :182)
>         at net.sourceforge.pmd.AbstractRule.apply(AbstractRule.java:143)
>         at net.sourceforge.pmd.RuleSet.apply(RuleSet.java:91)
>         at net.sourceforge.pmd.PMD.processFile(PMD.java:75)
>         at org.apache.maven.plugin.pmd.PmdReport.executeReport(
> PmdReport.java:253)
>         ... 21 more
>
> Tiago
>
> On 4/24/06, Mike Perham <[EMAIL PROTECTED]> wrote:
> >
> > http://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html
> >
> > Look carefully.
> >
> > -----Original Message-----
> > From: Tiago Fernandez [mailto:[EMAIL PROTECTED]
> > Sent: Monday, April 24, 2006 6:13 PM
> > To: Maven Users Group
> > Subject: [m2.0.4] PMD enum and JDK 1.5
> >
> > Hello,
> >
> > It seems PMD 3.4 Maven Plug-in is ignoring my <targetjdk/> tag, because
> > it's complaining about the 'enum' keyword:
> >
> > [INFO] Error during report generation
> >
> > Embedded error: Failure executing PMD for:
> > C:\develop\foundation\gui\src\main\java\tlf\foundation\gui\LookAndFeel.j
> > ava
> > ERROR: Can't use enum as a keyword in pre-JDK 1.5 target
> >
> > Here goes my XML:
> >
> >         <plugin>
> >             <groupId>org.apache.maven.plugins</groupId>
> >             <artifactId>maven-pmd-plugin</artifactId>
> >             <configuration>
> >               <targetjdk>1.5</targetjdk>
> >               <rulesets>
> >
> > <ruleset>../common/ruleset/pmd-ruleset_3_4.xml</ruleset>
> >               </rulesets>
> >               <format>xml</format>
> >               <linkXref>true</linkXref>
> >               <sourceEncoding>utf-8</sourceEncoding>
> >               <minimumTokens>100</minimumTokens>
> >             </configuration>
> >         </plugin>
> >
> > I've found an entry for the same issue, but without a clear answer:
> > http://mail-archives.apache.org/mod_mbox/maven-users/200602.mbox/%3Cc7c5
> > [EMAIL PROTECTED]
> >
> > Can anybody help me?
> >
> > Thanks,
> > --
> > Tiago Fernandez
> > http://www.tiago182.spyw.com
> >
>

Reply via email to