GlassFish Server 4.1.1
Maven 3.0.5 (bundled with NetBeans 8.3)
In NetBeans IDE, trying to run a Maven project on GlassFish generates the following Maven Error:
Return code is: 501 , ReasonPhrase:HTTPS Required
Effective January 15, 2020, the Maven Central Repository no longer accepts non-SSL HTTP connections. You have to use TLS, i.e. the HTTPS protocol. Upgrading to a more recent version of Maven resolves the error.
Use a non-bundled recent version of Maven installed on your system. Download directly from the Maven site and install on your system.
Then in NetBeans 8.2, go to Tools -> Options, then select the Java tab and then the Maven tab:
Note the outdated version. Click the drop-down box and select the stand-alone version that you installed.
Upgrading to the later Maven version, for example 3.6.3 resolves the error.