我有一个编译错误,无论何时我尝试安装我的项目,问题似乎是maven(2.5.1)不支持JDK 7,错误如下:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:
compile (default-compile) on project media: Compilation failure
[ERROR] UpdateEmployee.java:[23,12] error: strings in switch are not supported in -source 1.5
我试图安装maven 3.3.3并且我做了但是eclipse仍然使用版本2.5.1,我该怎么办?
注意:我正在使用SpringToolSuite Version: 3.6.3.RELEASE
另外,这是我的pom.xml
:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.media</groupId>
<artifactId>media</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>Media</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sf.dozer</groupId>
<artifactId>dozer</artifactId>
<version>5.5.1</version>
</dependency>
</dependencies>
</project>