-2

my pom.xml(just a piece) is the following:

            <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>

running the following command: mvn install generates the following exception:

[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]

It is looks like i cannot connect to maven central repository or a connection problem. Ani idea plz where is my error?

If you notice the connection try connect to repo.maven.apache.org through the port 443. So if I try: telnet repo.maven.apache.org 443 i get :

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

BUT if I try telnet repo.maven.apache.org 80 command shows:

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

the settings.xml is as follows:

<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>
bib
  • 944
  • 3
  • 15
  • 32

2 Answers2

3

The error most probably lies in your network connection, maybe also in your firewall. This is not a Maven or programming problem.

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142
  • So please what should i change? – bib Mar 01 '19 at 19:48
  • Depends on your network. If you are in a company network, speak with the administrator. If you are on a private computer, check the internet connection, check your firewall and try again. – J Fabian Meier Mar 01 '19 at 20:05
0

Maybe you can try other mirror site guide mirror settings

howie
  • 2,587
  • 3
  • 27
  • 43
  • with this mirror i get: 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 UK (http://uk.maven.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1] – bib Mar 02 '19 at 04:15
  • what's you maven version ? os environment ? – howie Mar 02 '19 at 04:38
  • https://stackoverflow.com/questions/25911623/problems-using-maven-and-ssl-behind-proxy – howie Mar 02 '19 at 04:39
  • Maven 3.5 im using SSH linux server.Im connecting to this server through MobaXterm software – bib Mar 02 '19 at 07:29