rafalindo
rafalindo

Reputation: 13

Missing maven dependencies and compilation error in eclipse project, STS 4.15.3 windows version

I'm going through this difficulty, I'm new to using this technology. Before formatting the machine, this project was running perfectly, I backed up everything and formatted. Now that I try to import the project into the software I come across some errors.

I performed the import through Maven->existing maven projects, the build runs, but returns the following errors:

  1. Error in pom.xml file.
  2. Some maven dependencies are missing.
  3. Build path specifies JavaSE-11 execution environment. There are no JREs installed in the workspace that are strictly compatible with this environment.
  4. The compiler compliance specified is 11 but a JRE 17 is used.

Please,look at the prints: POM file Error Log Properties Properties

Since then I have been trying to resolve these issues, I have checked the versions of java, jre, jdk and the like. I managed to partially solve the jre problem but after some time I had conflicts again, but involving maven dependencies I didn't get any success.

Honestly I don't understand the reason for the errors, I kept the same computer settings before formatting, that is, I installed the versions that were before.

Upvotes: 0

Views: 1687

Answers (1)

Martin Lippert
Martin Lippert

Reputation: 6508

I would suggest to look into the preferences for the installed JDKs/JREs for your workspace. You can find those settings via Preferences -> Java -> Installed JREs. There you can see which JREs are configured to be used by the IDE for your projects (in general).

Then, please also take a look at the Execution Environment category below that preference node. There you can define which JRE should be used for which execution environment. Your project seem to require a JavaSE-11 environment. When you select that environment from the list, you will see which installed JRE the IDE will use to fulfill that JavaSE-11 requirement of the project.

I would also run a Maven -> Update Project---, since the dependences that are marked in the pom.xml file seem to be just fine, so probably a broken download of those dependencies, but also hard to say without the exact errors being mentioned.

Upvotes: 1

Related Questions