Reputation: 249
I am trying to build my office project where I've upgraded from java 11 to 17.
I've updated my maven according to the compatible java version and after getting a a lot of help on the rest of the errors I'm still stuck on this one.
Things I've updated till now:
Eclipse version, java version , java version , surefire plugin details, mirrorOf tag in settings.xml.
Details of the versions are mentioned below :
Java version - 17 .
Java Home - C:\Program Files\Java\jdk-17.0.5
java path - C:\Program Files\Java\jdk-17.0.5\bin -
java version in my pom - 17
maven version installed in my system - 3.8.5
maven_home - C:\project\Softwares\Maven\apache-maven-3.8.5\bin
maven in my pom.xml - 3.8.1
Now after setting up everything , this is the error. Please help me in rectifying this :
Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.2' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Cannot access defaults field of Properties
EDIT 1 : Adding the pom.xml 4.0.0
Upvotes: 15
Views: 26256
Reputation: 171
Try below options
In your pom.xml, configure the below plugins
Try cleaning the project and updating the maven dependencies (right-click project -> Maven -> Update Project)
If it doesn't work, there might be an issue with your Maven install. You may try uninstalling the M2Eclipse plugin, deleting the .m2 folder on your drive, and then reinstalling M2Eclipse.
PS:
I noticed that you have used servlet 3 dependencies in your project. Since you are using java 17, you might upgrade them accordingly to the latest available versions
Upvotes: 16