title: Enforcing java 6 source compatibility in maven and/or eclipse
body: <p>The method java.lang.Long.compare(x, y) exists in Java 7 but not Java 6. So obviously this causes a NoSuchMethodException if code using this method is deployed to a server running Java 6.  </p>
  
  <p>However, either Maven nor Eclipse were picking up the error despite having set the source-compliance level to 1.6 in eclipse and the maven compiler source &amp; target to 1.6.</p>
  
  <p>Is there a way to enforce full Java 6 compliance in Eclipse, apart from downgrading my JRE to 6?</p>