I got error message every time I changed my pom.xml in eclipse.
Build errors for myapp; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to ex
This is the step I did to solve that problem (Eclipse 3.7 Indigo):
Window -> Preferences -> Java -> installed JREs -> I have a JRE from the JDK location, my location looks like C:\Program Files\Java\jdk1.6.0_26
Window -> Preferences -> Java -> installed JREs -> Execution Environments -> Select JavaSE-1.6 and select a compatible JDK which should be the one set in the previous step.
Window -> Preferences -> Java -> installed JREs, add jdk6 to point to your jdk(C:\Program Files\Java\jdk1.6.0_25), delete default jre6. it works.
Window -> Preferences -> Java -> installed JREs -> Execution Enviroments -> click the checkbox on the right side
This worked for me too :
It looks like your JAVA_HOME is not set properly. Can you echo JAVA_HOME from your terminal & see where it is pointing to? From the above error log it looks like its pointing to program files folder.
If you are encountering this problem when trying to run maven from eclipse, then you may want to refer to this discussion, which also outlines the solution.