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.

5 thoughts on “Maven Error Return code is: 501, ReasonPhrase: HTTPS Required

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s