Today I got this error when I ran a Maven build with the test goal on the new build server that I configured to compile the Java code.
[INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ xxxxxx —
[INFO] Changes detected – recompiling the module!
[INFO] Compiling 67 source files to C:\Sc\ xxxxxx \target\classes
[INFO] BUILD FAILURE
[INFO] Total time: 6.551 s
[INFO] Finished at: 2016-02-08T17:31:25-05:00
[INFO] Final Memory: 11M/61M
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project xxxxxx Compilation failure -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
I have the same .m2 folder as the other build severs. Maven and the JDK are configured properly as well. The only difference turned out to be that this server had a newer version of the Java JDK than the other servers. After inspecting the pom.xml file, I noticed that the maven-compiler-plugin had the javac.exe path hard coded
I removed the hardcoded path and specified the Java version instead.
You can also follow the instructions at http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html to target multiple versions of the JDK
While I was trying run a TFS build for the first time on a Windows 2008 R2 SP1 machine, I got the following error
Unable to load task handler PowerShell for task Maven with version 1.0.13
To determine the Powershell version that is installed on your system:
Open Windows Powershell
If you have a version that is lower than 3.0, you will need to update to a recent version of Powershell
In my case, I had PS 2.0 installed. I upgraded to PS 4.0 which I downloaded from
and that fixed my issue
PS: read the installation instructions to determine proper file name to download