I work on a Java program that should be compatibe with Java 5. I had @Override
annotations on implemented interface methods which is allowed in Java 6, but not in 5. I use a Java 6 SDK. Eclipse correctly gives error messages on the @Override
when I set it to 5.0 compliance. My Maven build, however, runs without even a warning, using the following settings in my POM:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
Am I correct in expecting that this should actually make the build fail? Why doesn't it, and is there something I can do?