Maven Error Return code is: 501, ReasonPhrase: HTTPS Required

Windows 10
NetBeans 8.2
JDK 1.8.0_241
GlassFish Server 4.1.1
Maven 3.0.5 (bundled with NetBeans 8.3)

Issue

In NetBeans IDE, trying to run a Maven project on GlassFish generates the following Maven Error:

Return code is: 501 , ReasonPhrase:HTTPS Required

Cause

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.

Fix

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.

Cannot run program “cmd”, Malformed argument has embedded quote

Windows 10
NetBeans 8.2
JDK 1.8.0_241
GlassFish Server 4.1.1

Issue

While trying to run a Maven project, the following error is generated in NetBeans IDE:

Cannot run program “cmd”, Malformed argument has embedded quote

Fix

Edit:
C:\Program Files\NetBeans 8.2\etc\netbeans.conf

Append to “netbeans_default_options”:
-J-Djdk.lang.Process.allowAmbiguousCommands=true

For example:
netbeans_default_options=”-J-client -J-Xss2m -J-Xms32m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true -J-Djdk.lang.Process.allowAmbiguousCommands=true”

The cause of this error is due to the Java update mentioned here:

https://www.oracle.com/technetwork/java/javase/13-0-1-relnotes-5592797.html#JDK-8221858