Community
Participate
Working Groups
Build Identifier: 20110916-0149 I'm working with m2e plugin version 1.0.100.20110804-1717. There is only one 'installed jre' : jdk1.6.0_23 (c:\....\jdk1.6.0_23) If I do new maven project ... create a simple project (or any other archetype), the project is created with jre system library : J2SE-1.5 containing some jars from c:\....\jdk1.6.0_23\jre\lib. And there is a warning message : Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment. JRE System Library Problem. The pom.xml is only containing <project xmlns="...maven.apache.org/POM/4.0.0" xmlns:xsi="...www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="...maven.apache.org/POM/4.0.0 ...maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>toto</groupId> <artifactId>toto</artifactId> <version>0.0.1-SNAPSHOT</version> </project> So I have to add manually, for each project, <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> How to fix the problem ? Reproducible: Always Steps to Reproduce: 1.Create new maven project 2. 3.
The observed behaviour is expected and desired. m2e matches workspace project JRE to the java version configured in pom.xml.
(In reply to comment #1) > The observed behaviour is expected and desired. m2e matches workspace project > JRE to the java version configured in pom.xml. Thanks, but wichh pom.xml ? When creating a new maven project, there is not yet a pom.xml. And the file created does not contains any jre references.
Maven (maven-compiler-plugin, to be precise) provides default java level.
Moved to https://github.com/eclipse-m2e/m2e-core/issues/