0

I am getting the below error as soon as I import a maven project and build it from : Run as > Maven build.

I deleted my .m2 folder and everything related to Eclipse in order to start over from scratch still didn't work.

I tried : Maven > Update Project > Force update but not work.

Build Error:

[ERROR] Failed to execute goal on project ecours: Could not resolve dependencies for project com.ecours:ecours:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at org.primefaces.themes:sunny:jar:1.0.10: Failed to read artifact descriptor for org.primefaces.themes:sunny:jar:1.0.10: Could not transfer artifact org.primefaces.themes:sunny:pom:1.0.10 from/to prime-repo (http://repository.primefaces.org): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]

pom.xml

<properties>
    <org.springframework-version>4.3.10.RELEASE</org.springframework-version>
    <primefaces-version>5.3</primefaces-version>
</properties>

<dependencies>
    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>2.2.4</version>
    </dependency>
    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>2.2.4</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
        <version>1.2</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>3.0-alpha-1</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet.jsp</groupId>
        <artifactId>javax.servlet.jsp-api</artifactId>
        <version>2.3.1</version>
    </dependency>
    <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>javax.faces-api</artifactId>
        <version>2.2</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.springframeswork</groupId>
        <artifactId>spring-core</artifactId>
        <version>${org.springframework-version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${org.springframework-version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${org.springframework-version}</version>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.9</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>5.2.9.Final</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-jpa</artifactId>
        <version>1.11.6.RELEASE</version>
    </dependency>


    <dependency>
        <groupId>com.jolbox</groupId>
        <artifactId>bonecp</artifactId>
        <version>0.7.1.RELEASE</version>
    </dependency>
    <dependency>
        <groupId>org.primefaces</groupId>
        <artifactId>primefaces</artifactId>
        <version>${primefaces-version}</version>
    </dependency>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.16.2</version>
    </dependency>
    <dependency>
        <groupId>org.primefaces.themes</groupId>
        <artifactId>sunny</artifactId>
        <version>1.0.10</version>
    </dependency>
</dependencies>

<repositories>
    <repository>
        <id>prime-repo</id>
        <name>PrimeFaces Maven Repository</name>
        <url>http://repository.primefaces.org</url>
        <layout>default</layout>
    </repository>
</repositories>

Any help?

hmzn
  • 321
  • 2
  • 6
  • 22

1 Answers1

1

There's a typo in this dependency:

<dependency>
    <groupId>org.springframeswork</groupId>
    <artifactId>spring-core</artifactId>
    <version>${org.springframework-version}</version>
</dependency>

Note the unwanted "s" at the end "springframe".

Replace org.springframeswork with org.springframework

glytching
  • 44,936
  • 9
  • 114
  • 120
  • Showing another error : Failed to collect dependencies at org.primefaces.themes. – hmzn Aug 14 '17 at 13:37
  • There is nothing in [Maven Central](http://search.maven.org/#search|ga|1|org.primefaces.themes) for `groupId=org.primefaces.themes`. So, presumably that's intended to be resolved from http://repository.primefaces.org? If so, could you update your question to show the revised error message when attempting to resolve that dependency? – glytching Aug 14 '17 at 13:41
  • How can I use themes from repository.primefaces.org ? – hmzn Aug 14 '17 at 13:52
  • Could you update your question to show the revised error message when attempting to resolve the `org.primefaces.themes` dependency? Or alternatively raise a new question which specifically addresses the issue you are encountering when attemptiong to resolve **that** dependency. – glytching Aug 14 '17 at 13:54
  • Ok, so I think you are referring to this: `PKIX path building failed`. This tells us that the primefaces repository demands some form of authetication from you. Have a look at [this answer](https://stackoverflow.com/questions/37398179/streamparse-wordcount-example/37411410#37411410) for details on how to authenticate against a Maven repo provider. – glytching Aug 14 '17 at 14:07
  • Using command : keytool -importcert -trustcacerts -alias c:\maven-cacert.cer -file "C:/Users/pab/Desktop/jsf_workspace/clojarsorg.crt" -keystore "C:/Program Files/Java/jdk1.8.0_31/jre/lib/security/cacerts". But the same error – hmzn Aug 14 '17 at 19:22