Maven “build path specifies execution environment J2SE-1.5”, even though I changed it to 1.7

后端 未结 11 1552
天涯浪人
天涯浪人 2020-11-27 12:00

In Eclipse Juno, I installed the latest m2e plugin (1.2.20120903-1050). In preferences, I have added jdk1.7.0_11 in Java -> Installed JREs -> Add, and then specified the lo

11条回答
  •  甜味超标
    2020-11-27 12:46

    For imported maven project and JDK 1.7 do the following:

    1. Delete project from Eclipse (keep files)
    2. Delete .settings directory, .project and .classpath files inside your project directory.
    3. Modify your pom.xml file, add following properties (make sure following settings are not overridden by explicit maven-compiler-plugin definition in your POM)

      
          1.7
          1.7
      
      
    4. Import updated project into Eclipse.

提交回复
热议问题