gwt-plugins / gwt-eclipse-plugin

GWT Eclipse Plugin Documentation
http://gwt-plugins.github.io/documentation/
Eclipse Public License 1.0
114 stars 47 forks source link

Update DTD url to HTTPS to avoid Eclipse 2023-03 errors #463

Closed jhillbounce closed 1 year ago

jhillbounce commented 1 year ago

Eclipse 2023-03 Shows Language Server Errors when connecting to the GWT http URL for the DTD. Switching the DTD to the https URL resolves the issue.

Example Errors: Element type "add-linker" must be declared. Element type "entry-point" must be declared. Element type "inherits" must be declared. Element type "inherits" must be declared. Element type "module" must be declared. Element type "source" must be declared. Element type "source" must be declared. There is '1' error in 'http://gwtproject.org/doctype/2.9.0/gwt-module.dtd'. ... Language Servers

It looks very similar to this issue. (Turning off the XML Language Server setting in Eclipse 2023-03 - hides the error) https://stackoverflow.com/questions/62113303/how-to-avoid-error-messages-in-eclipse-2020-03-for-gwt-ui-xml-files-language-se

niloc132 commented 1 year ago

It is odd that the old URL worked, since that had a redirect too - all gwtproject.org urls were auto-redirected to www.gwtproject.org. We only added another step of also redirecting http to https.

Maybe we should disable requiring https on a few specific URLs like this? I'm not quite sure where to do that, but we could disable the www. redirect at https://github.com/Vertispan/gwtproject.org/blob/main/www/www-redirect.conf.template

As the above repo notes, we're using (and assuming) something like https://github.com/nginx-proxy/nginx-proxy to manage https termination. We could in theory set HTTPS_METHOD=noredirect according to those docs, but we only want to exclude it for these specific URLs.

This is still a good change to make, we should push towards https.

jhillbounce commented 1 year ago

It's odd - I must have a different plugin installed on Eclipse 2023-03 or I am searching in the wrong place. I'm closing this pull request. I'm not finding the proper code that sets the DTD to http://gwtproject.org/doctype/2.9.0/gwt-module.dtd

Noting that the maven plugin does not attempt to set the DTD.

For reference - the first part of the module.gwt.xml file looks like...

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.9.0//EN" "http://gwtproject.org/doctype/2.9.0/gwt-module.dtd">

...