Issue
I am a relative newcomer to the world of Java enterprise development. My organization's Java guru is out on indefinite family leave, and I have been assigned the task of maintaining some of the Java applications he developed. He setup Eclipse [Kepler SR1] with Maven on my computer before he left, and it appeared to work ok.
Now I'm ready to deploy my first modification and need to run a Maven install
, but I am having trouble getting it to work - I get the following output on my console:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project mrpapp: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
but I definitely am running a JDK and not a JRE. I double-checked my $JAVA_HOME
(C:\Program Files (x86)\Java\jdk1.7.0_60
) and it does have a javac.exe
in its bin
directory.
I am attaching a copy of my pom.xml
file for your review. I'm sure there is something in there that is causing the problem, but I am not sure what it might be. I am using a laptop with Windows 7 64bit, if you need any further platform/environment info I can supply that as well.
Any help will be greatly appreciated.
Solution
Go to Window → Preferences → Java → Installed JREs.
And see if there is an entry pointing to your JDK path, and if not, click on Edit button and put the path you configured your JAVA_HOME
environment.
Answered By - Jorge Campos