eclipse-platform / .github

Common contribution content for eclipse-platform repositories
https://www.eclipse.org/eclipse/
4 stars 10 forks source link

new maven project should match default installed JRE #170

Closed pekuz closed 7 months ago

pekuz commented 7 months ago

Steps to reproduce

Eclipse IDE for Java Developers (includes Incubating components) Version: 2023-06 (4.28.0) Build id: 20230608-1333

I have Java 11 as the default installed JRE. I create a new maven project, in a simple way. I start coding, when using a lambda, I get an error that lamdas are not supported. Well, eclipse auto-detected the created project as targeting Java 1.7 SE.

What is the current bug behavior?

eclipse auto-detects a from-template created maven project as targeting Java 1.7 SE.

What is the expected correct behavior?

I expect new project targets default installed JRE.

Meanwhile, I had to manually update pom.xml

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>11</source>
          <target>11</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

and then Maven > Update Project to fix it. (It is just a workaround that worked for me.)

Impact

It complicates adoption of more relevant Java technologies. Also, eclipse experience is not great for Java technology tutorials that start by creating a maven project.

akurtakov commented 7 months ago

This is not Eclipse Platform issue. Please report to M2e https://github.com/eclipse-m2e/m2e-core/ as there is nothing in Eclipse Platform for Java or Maven projects.

pekuz commented 7 months ago

thx, https://github.com/eclipse-m2e/m2e-core/issues/1604