Maven project compiler-plugin target isn't activated

64 views Asked by At

I have a maven web-service project and I use a configuration for the "compiler-plugin", set to use 1.6 version source and target:

      <build>
        <plugins>
              <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>

I have configured in my pc version 1.8 of the Java Compiler (JDK).

I run tomcat with the 1.7 JRE (Java Runtime Environment) and I get the following exception in the logs:

          Unsupported major.minor version 52.0

which is refered to the uncompatibility of the compiled version with the runtime.

If I change my java compiler to the version 1.7, and recompile the project, the projects deploys correctly to tomcat and I dont get any log error.

Is there any command for maven to check which compiling version it reads from the configuration? Is it a known problem of the plugin?

0

There are 0 answers