Here is how to configure it for 1.6 <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin>
Typically you put this into pluginManagement in a parent or even company pom to set a standard across a project or the whole organization. It is also good practice to control the version .. latest is 3.0 manfred > Yes, 1.5 is the default used by recent maven-compile-plugin versions. > > -- > Regards, > Igor > > On 2013-01-23 11:36 AM, Steve Cohen wrote: >> On 01/23/2013 10:26 AM, Igor Fedorenko wrote: >>> To maintain parity with command line build, m2e configures workspace >>> project java compiler source/target levels based on >>> maven-compiler-plugin configuration. Doing otherwise would result in >>> inconsistency between m2e workspace and command line builds. >>> >>> -- >>> Regards, >>> Igor >>> >>> On 2013-01-23 11:17 AM, Steve Cohen wrote: >>>> Aarrggh! >>>> >>>> I've been going along just fine in M2E using a 1.6 JRE to build and >>>> run >>>> the code. Without going into too many details, I decided to add a >>>> JUnit >>>> test to my project. I added the surefire-junit4 plugin (vers 2.7.1) >>>> to >>>> my dependencies, update the project configuration and find my JRE >>>> changed to 1.5 instead of my default 1.6 version. >>>> >>>> I have am using the default maven-compiler-plugin and have not needed >>>> to >>>> mess with it until now. >>>> >>>> Without getting into too many details at first, can someone tell me >>>> what >>>> would be the simplest way to get myself going? >>>> >>>> Thanks. >>>> >>>> _______________________________________________ >>>> m2e-users mailing list >>>> [email protected] >>>> https://dev.eclipse.org/mailman/listinfo/m2e-users >>> _______________________________________________ >>> m2e-users mailing list >>> [email protected] >>> https://dev.eclipse.org/mailman/listinfo/m2e-users >>> >>> >> OK, this seems to be my problem then. I must explicitly define the >> compiler plugin configuration and tell it to use 1.6? Is 1.5 the >> default or something? >> _______________________________________________ >> m2e-users mailing list >> [email protected] >> https://dev.eclipse.org/mailman/listinfo/m2e-users > _______________________________________________ > m2e-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/m2e-users > _______________________________________________ m2e-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/m2e-users
