Maven - use -source 5 or higher to enable… while building the project

后端 未结 1 748
时光取名叫无心
时光取名叫无心 2020-12-18 04:20

I downloaded one project from our svn and now I am trying to build this using Maven (mvn clean install... my maven is Apache Maven 3.0.4). Unfortunately, when I try to build

相关标签:
1条回答
  • 2020-12-18 05:10

    You must specify the source configuration parameter to the maven-compiler-plugin like this:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
        </configuration>
      </plugin>
    

    See also Setting the -source and -target of the Java Compiler in the maven documentation for further details.

    0 讨论(0)
提交回复
热议问题