0

Я хочу подключится к серверу астериска, но у меня выводит ошибку

Failed to execute goal on project mavenproject1: Could not resolve dependencies for project org.asteriskjava:mavenproject1:jar:1.0-SNAPSHOT: Failed to collect dependencies for [org.asteriskjava:asterisk-java:jar:1.0.0-final (compile)]: Failed to read artifact descriptor for org.asteriskjava:asterisk-java:jar:1.0.0-final: Could not transfer artifact org.asteriskjava:asterisk-java:pom:1.0.0-final from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/asteriskjava/asterisk-java/1.0.0-final/asterisk-java-1.0.0-final.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:

Хотя я добавил зависимость

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.asteriskjava</groupId>
    <artifactId>mavenproject1</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
    <dependencies>
     <dependency>
            <groupId>org.asteriskjava</groupId>
            <artifactId>asterisk-java</artifactId>
            <version>1.0.0-final</version>
</dependency>
    </dependencies>
</project>
1

1 ответ 1

1

Дело в том, что с 15 января 2020, The Central Maven Repository (https://support.sonatype.com/hc/en-us/articles/360041287334-Central-501-HTTPS-Required) перестал работать через http, и теперь работает только через https.
Вот ссылка на ответ с английского SO: https://stackoverflow.com/questions/59764749/requests-to-http-repo1-maven-org-maven2-return-a-501-https-required-status-an

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.