title: Wrong maven compilation error (works in eclipse)
body: <p>I'm getting a compilation error when I compile using maven but works in eclipse. Both are using the same JDK:</p>
  
  <pre><code>java -version
  java version "1.6.0_35"
  Java(TM) SE Runtime Environment (build 1.6.0_35-b10)
  Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01, mixed mode)
  
  mvn -version
  Apache Maven 3.0.4
  Maven home: /usr/share/maven
  Java version: 1.6.0_35, vendor: Sun Microsystems Inc.
  Java home: /usr/lib/jvm/jdk1.6.0_35/jre
  Default locale: es_ES, platform encoding: UTF-8
  OS name: "linux", version: "3.2.0-29-generic", arch: "amd64", family: "unix"
  </code></pre>
  
  <p>This is the error:</p>
  
  <pre><code>[ERROR] /blablabla.../myClass.java:    [78,107] inconvertible types
  [ERROR] found   : java.util.Collection&lt;java.lang.Object&gt;
  [ERROR] required: java.util.Collection&lt;? extends org.springframework.integration.store.MessageGroup&gt;
  [ERROR] -&gt; [Help 1]
  </code></pre>
  
  <p>And this is the code (no compilation error in eclipse):</p>
  
  <pre><code>Collection&lt;? extends MessageGroup&gt; collection = (Collection&lt;? extends MessageGroup&gt;) this.groupMap.values();
  </code></pre>
  
  <p>I know that this is a pretty recursive issue, I've found a few posts asking the same, but seems that nobody has a standar fix. Some people say that works with different JDK version. I have tested with 1.6.0_30, 1.6.0_31, 1.6.0_32 and 1.6.0_35 and all fail.</p>
  
  <p>Any idea?</p>
  
  <p>Thanks</p>