That's indeed a nice workaround for a failure inside the maven2 plugin.
I've set up these externaltools and nog it's ok.

It's rather a pitty that the build-in functionality (e.g. maven2 install)
fails
because the pmd:pmd mojo cannot be executed.

If anybody has any idea why it's failing, please let me know ;-)

Thanks,
LeS.





Pete <[EMAIL PROTECTED]>
14/03/2007 17:30
Please respond to
"Maven Users List" <[email protected]>


To
"Maven Users List" <[email protected]>
cc

Subject
Re: Maven2 plugin for eclipse






I'd say give up with all these Maven integration plugins and just use
Eclipse's external tools facility to run mvn for any selected folder
e.g.

Set up a new External Tool as follows :

Name:  mvn clean install

Location:   ${env_var:M2_HOME}/bin/mvn.bat

Working Directory: ${resource_loc}

Arguments:  clean install

Then just select the folder or project in the Eclipse Java Tree
(folder must have a pom.xml in it) then select this external tool 'mvn
clean install' - once run once it will be on the drop down.

You can set up the common maven goals like this, then share the
External tools configuration by using the 'Common' tab and specifying
a folder that is under SCM.

At least this way you know Maven is behaving as it does from the
command line, periodically you need to run eclipse:eclipse, but this
can be done as above.

Also can set up an 'General Project' in Eclipse that points to your
local repo folder, this allows you to search this area and open pom
files if necessary.

I would gladly swap to a Plugin but there always seems to be
unexpected side effects.




On 14/03/07, Leslie Bertels <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I trying to run pmd using the maven-pmd-plugin configured in my pom.xml
> from within Eclipse.
> Using the command line, everything works fine (mvn pmd:pmd)
>
> When invoking the maven2 verify goal from within Eclipse using the Run
as
> - Maven2 build ...
> I receive the following error:
>
> INFO] pmd:pmd
> [ERROR] mojo-execute : pmd:pmd
> Diagnosis: An error has occurred in PMD Report report generation.
> FATAL ERROR: Error executing Maven for a project
> [ERROR] project-execute : project.test:test-pojo:jar:1.0.0 (
task-segment:
> [pmd:pmd] )
> Diagnosis: An error has occurred in PMD Report report generation.
> FATAL ERROR: Error executing Maven for a project
> [ERROR] reactor-execute : D:\dev.env\dev\projects\test\TestProject
> Diagnosis: An error has occurred in PMD Report report generation.
> FATAL ERROR: Error executing Maven for a project
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] An error has occurred in PMD Report report generation.
>
> [INFO]
> ------------------------------------------------------------------------
> [DEBUG] Trace An error has occurred in PMD Report report generation.
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Wed Mar 14 16:18:17 CET 2007
> [INFO] Final Memory: 3M/6M
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error for project: Unnamed - project.test:test-pojo:jar:1.0.0
> (during pmd:pmd)
> [INFO]
> ------------------------------------------------------------------------
> [INFO] An error has occurred in PMD Report report generation.
>
> [INFO]
> ------------------------------------------------------------------------
> [DEBUG] Trace An error has occurred in PMD Report report generation.
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] reactor-execute : D:\dev.env\dev\projects\test\TestProject
> FATAL ERROR: Error executing Maven for a project
> [INFO] BUILD ERRORS
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Wed Mar 14 16:18:17 CET 2007
> [INFO] Final Memory: 3M/6M
> [INFO]
> ------------------------------------------------------------------------
>
>
> Has anybody had the same problems?
> Thanks in advance,
> Regards,
> Les.
>
>
> Reference info:
> I'm using the following pom.xml
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi=
> "http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=
> "http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd";>
>         <modelVersion>4.0.0</modelVersion>
>         <groupId>project.test</groupId>
>         <artifactId>test-pojo</artifactId>
>         <version>1.0.0</version>
>         <description>Template for Pojo Projects supported by Maven
Build</
> description>
>         <build>
>                 <plugins>
>                         <plugin>
>                                 <artifactId>maven-compiler-plugin</
> artifactId>
>                                 <configuration>
>                                         <source>1.5</source>
>                                         <target>1.5</target>
>                                 </configuration>
>                         </plugin>
>                         <plugin>
> <groupId>org.apache.maven.plugins</groupId
> >
> <artifactId>maven-pmd-plugin</artifactId>
>                                 <executions>
>                                         <execution>
>                                                 <goals>
> <goal>check</goal>
> <goal>cpd-check</
> goal>
>                                                 </goals>
>                                         </execution>
>                                 </executions>
>                         </plugin>
>                 </plugins>
>         </build>
>         <dependencies>
>                 <dependency>
>                         <groupId>junit</groupId>
>                         <artifactId>junit</artifactId>
>                         <version>4.1</version>
>                 </dependency>
>         </dependencies>
>         <reporting>
>                 <plugins>
>                         <plugin>
> <groupId>org.apache.maven.plugins</groupId
> >
> <artifactId>maven-pmd-plugin</artifactId>
>                                 <configuration>
>                                         <sourceEncoding>utf-8</
> sourceEncoding>
> <minimumTokens>100</minimumTokens>
>                                         <targetJdk>1.5</targetJdk>
>                                 </configuration>
>                         </plugin>
>                 </plugins>
>         </reporting>
> </project>
>
>
> The information contained in this communication is confidential and may
be legally privileged. It is intended solely for the use of the individual
or the entity to whom it is addressed and others authorised to receive it.
If you have received it by mistake, please let the sender know by e-mail
reply and delete it from your system.
> If you are not the intended recipient you are hereby notified that any
disclosure, copying, distribution or taking any action in reliance of the
contents of this information is strictly prohibited and may be unlawful.
> Honda Europe NV is neither liable for the proper and complete
transmission of the information contained in this communication nor for
any delay in its receipt.
>

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





The information contained in this communication is confidential and may be 
legally privileged. It is intended solely for the use of the individual or the 
entity to whom it is addressed and others authorised to receive it. If you have 
received it by mistake, please let the sender know by e-mail reply and delete 
it from your system.
If you are not the intended recipient you are hereby notified that any 
disclosure, copying, distribution or taking any action in reliance of the 
contents of this information is strictly prohibited and may be unlawful.
Honda Europe NV is neither liable for the proper and complete transmission of 
the information contained in this communication nor for any delay in its 
receipt.

Reply via email to