I am using JDK 1.5 / Maven 2.0.8 and am attempting mvn clean install on a
simple project that contains the following snippet:
...
public final Class<? extends Enum<? extends IDTOPhase>>
getDTOPhaseLifeCycleStrategy(){
return someEnumClass;
}
...
for(java.lang.Enum<? extends IDTOPhase> phase :
getDTOPhaseLifeCycleStrategy().getEnumConstants()){
...
}
...
The problem is that this compiles w/o a problem using ANT (or Eclipse build),
but fails using Maven. I get the error:
... incompatible types
found : java.lang.Enum<? extends IDTOPhase>
required : java.lang.Enum<? extends IDTOPhase>
I even set the maven-compiler-plugin to ensure compilation in 1.5
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
Any clue??? Thanks!