Как определить время подключения к центральному репозиторию Maven? - PullRequest
0 голосов
/ 01 марта 2019

my pom.xml (просто кусок) выглядит следующим образом:

            <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-core_2.10</artifactId>
            <version>2.0.0</version>
        </dependency>

    <dependency>
    <groupId>org.apache.spark</groupId>
    <artifactId>spark-graphx_2.12</artifactId>
    <version>2.4.0</version>
</dependency>

          <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-graphx_2.11</artifactId>
        <version>2.0.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-sql_2.11</artifactId>
        <version>2.0.0</version>
    </dependency>
      <dependency>
        <groupId>graphframes</groupId>
        <artifactId>graphframes</artifactId>
        <version>0.6.0-spark2.3-s_2.11</version>
    </dependency>
</dependencies>

<repositories>
    <!-- list of other repositories -->
    <repository>
        <id>SparkPackagesRepo</id>
        <url>http://dl.bintray.com/spark-packages/maven</url>
    </repository>
    <repository>              
          <id>central</id>
          <name>Central</name>
          <url>http://repo1.maven.org/maven2</url>
</repository>
 </repositories>

при выполнении следующей команды: mvn install создает следующее исключение:

[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.124.215] failed: Connection timed out (Connection timed out) -> [Help 1]

Это выглядит такя не могу подключиться к центральному репозиторию maven или проблема с подключением.Ани идея, плз, где моя ошибка?

Если вы заметили соединение, попробуйте подключиться к repo.maven.apache.org через порт 443. Поэтому, если я попытаюсь: telnet repo.maven.apache.org 443, я получу:

    Trying 151.101.124.215...
telnet: connect to address 151.101.124.215: Connection timed out

НО, если я попробую telnet repo.maven.apache.org 80, команда покажет:

Trying 151.101.124.215...
Connected to repo.maven.apache.org.
Escape character is '^]'.

settings.xml выглядит следующим образом:

<settings>
  <activeProfiles>
    <!--make the profile active all the time -->
    <activeProfile>securecentral</activeProfile>
  </activeProfiles>
  <profiles>
    <profile>
      <id>securecentral</id>
      <!--Override the repository (and pluginRepository) "central" from the
         Maven Super POM -->
      <repositories>
        <repository>
          <id>central</id>
          <url>http://repo1.maven.org/maven2</url>
          <releases>
            <enabled>true</enabled>
          </releases>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <url>http://repo1.maven.org/maven2</url>
          <releases>
            <enabled>true</enabled>
          </releases>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
</settings>

Ответы [ 2 ]

0 голосов
/ 02 марта 2019

Может быть, вы можете попробовать другой сайт зеркала руководство по настройке зеркала

0 голосов
/ 01 марта 2019

Ошибка, скорее всего, связана с вашим сетевым подключением, возможно, также с вашим брандмауэром.Это не проблема Maven или программирования.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...