M2eclipse embedded Maven and "command line" Maven are not the same, so they apply different default settings, from here the discrepancy between the two behaviours. Possible solutions are:
- explicitly set the source and target version as Anders Hammad said before or (better, after me) - configure m2eclipse to use the "normal", not embedded, maven, to do that in eclipse: windows->preferences->maven->installations, add your maven install dir, and check it. regards, Andrea