Just got interesting issue with compiling class file with @Override
annotation on method which implements interface method.
I tried to set up moquette project in eclipse and got compile error
Description Resource Path Location Type
The method decodable(IoSession, IoBuffer) of type PubAckDecoder must override a superclass method PubAckDecoder.java /moquette-parser/src/main/java/org/dna/mqtt/moquette/proto line 22 Java Problem
That seems correct as java 1.5 compliance level is used. However this project is successfully built with maven! That is strange for me.
There is following argument file which is used for javac compiler:
"-d"
"E:/workspaces/mqtt/moquette-mqtt/parser/target/classes"
"-classpath"
"E:/workspaces/mqtt/moquette-mqtt/parser/target/classes;e:/_mavenRepository/org/apache/mina/mina-core/2.0.4/mina-core-2.0.4.jar;e:/_mavenRepository/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar;e:/_mavenRepository/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar;e:/_mavenRepository/log4j/log4j/1.2.16/log4j-1.2.16.jar;"
"E:/workspaces/mqtt/moquette-mqtt/parser/src/main/java/org/dna/mqtt/moquette/proto/PubAckDecoder.java"
"-g"
"-nowarn"
"-target"
"1.5"
"-source"
"1.5"
"-encoding"
"UTF-8"
I removed all other source files and left just PubAckDecoder
which contains the error.
What am I missing? Why it is built with maven when it should not?
UPD
Maven configuration for compiler plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<fork>true</fork>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>