1

ive imported a bunch on maven projects from svn and they all (...a lot) try to use

JRE System Library [JavaSE-1.7]

But i only have

jdk1.8.0_102_64Bit

Which i told eclipse about in eclipse.ini with:

-vm C:\Users\myuser\Downloads\jdk1.8.0_102_64Bit\bin

Yet all the imported maven projects insist to use the "System JRE" which is unbound when i check it.

How do you tell maven to use what eclipse knows about? or where does maven get its information about JDK's / JRE'S?

J. Doe
  • 80
  • 1
  • 1
  • 7
  • I guess thy will be use the Compiler plugin.There can you set the target Version of the Project. – Jens Aug 28 '17 at 08:13
  • Possible duplicate of [What causes a new Maven project in Eclipse to use Java 1.5 instead of Java 1.6 by default and how can I ensure it doesn't?](https://stackoverflow.com/questions/3539139/what-causes-a-new-maven-project-in-eclipse-to-use-java-1-5-instead-of-java-1-6-b) – howlger Aug 28 '17 at 08:18

2 Answers2

1

Maven by default uses JAVA_HOME Environment Variable to know which java version to use. Unless you set different one in pom.xml.

Try check every pom.xml of your projects, they must have a plugin section like this:

<plugin>
     <groupId>org.apache.maven.plugins</groupId>
     <artifactId>maven-compiler-plugin</artifactId>
     <version>3.1</version>
     <configuration>
         <verbose>true</verbose>
         <fork>true</fork>
         <executable>${JAVA_1_6_HOME}/bin/javac</executable>
     </configuration>
</plugin>

Executable tag tell maven to use java 6 in this example.

amicoderozer
  • 2,046
  • 6
  • 28
  • 44
0

In this case i probably did something wrong while importing it from svn..a second try worked, but im not sure why :(

J. Doe
  • 80
  • 1
  • 1
  • 7