0

I have a compilation error that arrises whenever i try to install my project, the problem seems to be that maven (2.5.1) doesn't support JDK 7, the error is as follows:

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

i tried to instal maven 3.3.3 and i did but eclipse still use version 2.5.1, what can i do ?

Note: i'm using SpringToolSuite Version: 3.6.3.RELEASE

also, here's my 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>
Eslam Hamdy
  • 7,126
  • 27
  • 105
  • 165

0 Answers0