Maven : error: generics are not supported in -source 1.3 , I am using 1.6

前端 未结 5 731
礼貌的吻别
礼貌的吻别 2020-12-03 10:13

I have imported an existing Maven project into Eclipse IDE . I have modified some code in it , it compiled successfully , I am using Java 1.6 as compiler and when i am try

5条回答
  •  不知归路
    2020-12-03 10:26

    Another way that doesn't involve modifying the pom is to specify the source and target in the command line:

    mvn clean install -Dmaven.compiler.source=1.6 -Dmaven.compiler.target=1.6
    

    Note that this should be avoided generally as the build cannot be guaranteed to be repeatable this way.

提交回复
热议问题