In Eclipse, actions such as importing Maven projects or calling the "Update Sources" are performed in the same JVM in which Eclipse is running. If this JVM comes from a JRE that is not part of the JDK, there would be no Java compiler (tools.jar).
So, in order to start Maven from Eclipse, the JRE used to start it must also come from the JDK. By default, Eclipse registers the JRE, it starts, but it can be configured on the preferences page "Window / Preferences ... / Java / Installed JREs", as mentioned above, Parthasarathy
Alternatively, you can specify compilerId in pom.xml, so Maven will not look for the JDK when compiling Java code:
<plugin> <artifactid>maven-compiler-plugin</artifactid> <configuration> <compilerid>eclipse</compilerid> </configuration> <dependencies> <dependency> <groupid>org.codehaus.plexus</groupid> <artifactid>plexus-compiler-eclipse</artifactid> <version>xxxx</version> </dependency> </dependencies> </plugin>
san1deep2set3hi Apr 09 '14 at 4:35 a.m. 2014-04-09 04:35
source share