Issue
Due to where I work I am mot allowed to use screenshots although it is just one error anyway.
Friday I upgraded to Eclipse 2021-03 and AdoptOpenSDK 16. My main project (ActivePivot webapp) built successfully with Java 8 so I went home all happy and ready to come back Monday for the main plan!
Monday I obtained the vendor's Java11 only libs and added stuff to my repo. I have lots to do for the Java 11 cut but that is another story. (Feel free to tell me to go back to the LTS 11 if this is better although I thought I should be able to have two projects; 1 at 8 and 1 at 11 for time being).
Where I added the newer libs to the repo it obviously broke my Java 8 project. I thought it would be a simple case of just adding version tags for the many libraries/folders but of course, maybe it just me, but I've seen Maven get itself in a right old state before. And it did this time... :)
Eclipse launched the store and suggested I install some stuff to help with the project and it had detected I need Maven Natures. So I went with it. After that I now see this error:
'Could not initialize class org.apache.maven.plugin.war.util.WebappStructureSerializer pom.xml /cacib-activepivot line 1 Maven Configuration Problem'.
Has anyone seen this before? I can't seem to find much on it!
Thanks in advance for your assistance.
Leigh tilleytech.com
Solution
Eclipse 2021-03 was released at the same time as Java 16 and therefore has no built-in Java 16 support yet and was only able to be tested with early-access builds of Java 16.
Running Eclipse with Java 16 might cause issues in some plugins because of more stricter permissions in Java 16:
In eclipse.ini
adding --illegal-access=permit
should fix that (see e.g. here).
For using Java 16 in your projects (which is independent from the Java used to run Eclipse), install Java 16 Support for Eclipse 2021-03 (4.19), try a developer build or wait for Eclipse 2020-06, which will be released on 16 Juni, 2021. Also make sure that additionally installed plugins are up to date.
Answered By - howlger