Skip to content

Fix for the "cvc-elt.1.a: Cannot Find Declaration of Element 'project' in Maven Projects" error when building with JDKs from 21 and later #42

Description

@brotenet

@chabicht
Hello Carsten,

I tried building the project using OpenJDK version "25.0.3" 2026-04-21 and I bumped on the "cvc-elt.1.a: Cannot Find Declaration of Element 'project' in Maven Projects" error that occurs when one tries to build a project in Eclipse with Compliance Level 17 while not having JDK 17 installed. (In my case, only JDK 25 is installed).

The fix I used for this was to remove the POM.XML file from the "com.chabicht.code-intelligence" project and the switch the compliance-level to 21.

Image

``

I'm not sure if you would like to implement this change to the project so I'm just attaching a .zip file of the project as I have it now, even though I did not do any other changes to the rest of the project besides deleting the pom.xml and modifying the Eclipse project settings.

code-intelligence_compliance_fix.zip

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions