Trouble with Astah plugin SDK due to access error to Maven repository

On January 15th, 2020, Maven’s central repository moved to HTTPS.
This change may cause errors when you use Astah Plug-in SDK.

Errors

The following errors may occur when getting a library file from Maven central repository.

Return code is: 501, ReasonPhrase:HTTPS Required
or
Could not transfer artifact xxx from/to central.

Workaround

When the error noted above happens, please configure the settings related to the Maven repository in the configuration file (setting.xml). The target setting.xml you edit varies depending on the purpose.

Files to edit

  • If you enable Maven settings for all the users
    • Maven installed folder/conf/settings.xml
  • If you enable Maven settings for an individual user
    • User-home/.m2/settings.xml
  • If you want to enable Maven settings for Astah plug-in SDK only
    • Astah plug-in SDK installation folder/conf/settings.xml

How to edit

  1. If the central repository is explicitly specified as follows, change http:// to https://.

    E.g)
    Before: http://repo.maven.apache.org/maven2/
    After: https://repo.maven.apache.org/maven2/

    Before: http://repo1.maven.org/maven2/
    After: https://repo1.maven.org/maven2/

  2. If the central repository is NOT explicitly specified, add settings regarding the central repository.

(example)

<?xml version="1.0" encoding="UTF-8"?>
<settings>
...
    <mirrors>
        <mirror>
            <id>central-mirror</id>
            <mirrorOf>central</mirrorOf>
            <url>https://repo.maven.apache.org/maven2/</url>
        </mirror>
...
    </mirrors>
...

If this didn’t help solve your problem, please send us your report.

Thank you.

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 )

Facebook photo

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

Connecting to %s