0

I downloaded a Scala project which has the fillowing pom.xml:

<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/maven-v4_0_0.xsd">
    <groupId>mapr</groupId>
    <artifactId>auctionsapp</artifactId>
    <modelVersion>4.0.0</modelVersion>
    <name>auctionsapp</name>
    <packaging>jar</packaging>
    <version>1.0</version>
    <properties>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
        <encoding>UTF-8</encoding>
        <scala.tools.version>2.10</scala.tools.version>
        <scala.version>2.10.4</scala.version>
        <spark.version>1.5.2</spark.version>
    </properties>  
    <repositories>
        <repository>
            <id>scala-tools.org</id>
            <name>Scala-tools Maven2 Repository</name>
            <url>http://scala-tools.org/repo-releases</url>
        </repository>
        <repository>
            <id>mapr-releases</id>
            <url>http://repository.mapr.com/maven/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-core_${scala.tools.version}</artifactId>
            <version>${spark.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-sql_${scala.tools.version}</artifactId>
            <version>${spark.version}</version> 
        </dependency>
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-mllib_${scala.tools.version}</artifactId>
            <version>${spark.version}</version>
        </dependency>
    </dependencies>
    <build>
        <sourceDirectory>src/main/scala</sourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.scala-tools</groupId>                      
                <artifactId>maven-scala-plugin</artifactId>
                <version>2.15.2</version>                           
                <executions>                                    
                    <execution>                                 
                        <goals>                                     
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

The problem is that when I run mvn install I get:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.992 s
[INFO] Finished at: 2016-11-28T09:43:45+00:00
[INFO] Final Memory: 14M/188M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project auctionsapp: Could not resolve dependencies for project mapr:auctionsapp:jar:1.0: Failed to collect dependencies at org.apache.spark:spark-core_2.10:jar:1.5.2 -> org.apache.hadoop:hadoop-client:jar:2.7.0-mapr-1509 -> org.apache.hadoop:hadoop-common:jar:2.7.0-mapr-1509 -> com.mapr.hadoop:maprfs:jar:5.0.9-mapr: Failed to read artifact descriptor for com.mapr.hadoop:maprfs:jar:5.0.9-mapr: Could not transfer artifact com.mapr:mapr-root:pom:2.0-SNAPSHOT from/to scala-tools.org (http://scala-tools.org/repo-releases): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Any idea about what could be causing this?

bsky
  • 19,326
  • 49
  • 155
  • 270
  • you need to enter your network root certificate into your jre cacerts using keytool. for very detailed steps refer [this](http://stackoverflow.com/a/40757655/1802348) – positivecrux Dec 01 '16 at 11:42

1 Answers1

0

Could not transfer artifact com.mapr:mapr-root:pom:2.0-SNAPSHOT from/to scala-tools.org (http://scala-tools.org/repo-releases): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]

There seems to be a problem with the SSL certificate. Maybe this post is helpful: Problems using Maven and SSL behind proxy

Community
  • 1
  • 1
actc
  • 672
  • 1
  • 9
  • 23