0

I'm getting the error: annotations are not supported in version 1.3 when I do a mvn clean instal. However in my pom.xml I have

<build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.1</version>
                    <configuration>
                        <source>1.5</source>
                        <target>1.5</target>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>x.y</groupId>
                            <artifactId>z</artifactId>
                            <version>1.0-SNAPSHOT</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </build>

So it seems to be ignoring my source and target version for some reason. Does anyone have any idea why this is occuring?

jack
  • 1,902
  • 5
  • 32
  • 43
  • There must be 10⁹ dupes of this question, at least :) – Pascal Thivent Nov 08 '10 at 18:00
  • @Pascal just mark it as a dupe then – Pablo Fernandez Nov 08 '10 at 18:46
  • http://stackoverflow.com/questions/4049647/why-do-i-need-to-change-project-compliance-to-1-5, http://stackoverflow.com/questions/2239959/setting-the-compiler-versions, http://stackoverflow.com/questions/3012582/maven-default-compiler-compliance-level, http://stackoverflow.com/questions/2531650/default-maven-compiler-setting, http://stackoverflow.com/questions/3531260/how-can-i-force-maven-to-package-my-project-against-1-5, etc, etc, etc – Pascal Thivent Nov 09 '10 at 05:43

1 Answers1

3

Most probably the compile goal is failing.

The missing piece of config you need is this:

<plugin>
  <artifactId>maven-compiler-plugin</artifactId>
  <configuration>
    <source>1.5</source>
    <target>1.5</target>
  </configuration>
 </plugin>
Pablo Fernandez
  • 103,170
  • 56
  • 192
  • 232