IPGraySpace: Primefaces - How to resolve Primefaces maven build error

3 years ago
237

IPGraySpace: Primefaces - How to resolve primefaces maven build error
Failure to find org.primefaces.themes:themes-project:pom:1.0.10

This video shows how to resolve Primefaces maven build error - Could not resolve dependencies
for org.primefaces:primefaces

The error will look similar to the following

Failed to execute goal on project test: Could not resolve dependencies for project test:war:2.0:
Failed to collect dependencies for [javax:javaee-web-api:jar:7.0 (provided),
org.primefaces:primefaces:jar:6.0 (compile), org.primefaces.themes:cupertino:jar:1.0.10 (compile),
org.primefaces.themes:bootstrap:jar:1.0.10 (compile),
org.primefaces.extensions:primefaces-extensions:jar:6.0.0 (compile), org.primefaces.extensions:resources-ckeditor:jar:6.0.0 (compile), org.primefaces.extensions:resources-codemirror:jar:6.0.0 (compile), jdom:jdom:jar:1.1 (compile), rome:rome:jar:1.0 (compile), mysql:mysql-connector-java:jar:5.1.13 (compile), org.hibernate:hibernate-entitymanager:jar:4.1.8.Final (compile), org.hibernate:hibernate-testing:jar:4.3.8.Final (compile), org.jboss.weld:weld-core:jar:2.2.14.Final (compile), org.testng:testng:jar:6.8.1 (test), org.hibernate:hibernate-validator:jar:4.3.2.Final (compile), ch.qos.logback:logback-core:jar:1.1.3 (compile), ch.qos.logback:logback-classic:jar:1.1.3 (compile), ch.qos.logback:logback-examples:jar:1.0.0 (compile), org.slf4j:slf4j-api:jar:1.7.12 (compile), org.slf4j:slf4j-simple:jar:1.7.12 (compile)

Failed to read artifact descriptor for org.primefaces.themes:bootstrap:jar:1.0.10:
Failure to find org.primefaces.themes:themes-project:pom:1.0.10 in http://repo.maven.apache.org/maven2
was cached in the local repository,
resolution will not be reattempted until the update interval of central-no-ssl has elapsed
or updates are forced -> [Help 1]

To fix the issue all you have to do is

(try from command line)

add the following to the POM.XML file

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

why we have to add this!! because Primefaces decided not to add their libraries
in maven repository and we have to download from primefaces repository

now Run the maven command

1. mvn clean install -X

(if you get SSL cert error then use the following command)

<!-- use the following to ignore SSL -->

2. mvn clean install -DskipTests -Dmaven.wagon.http.ssl.insecure=true
-Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true -X

Follow more IPGraySpace videos
-----------------
thank you for watching the IPGraySpace video
please share, subscribe, and comment

visit
www.ipgray.com
www.ipgrayspace.com
for more IT articles, documents, and videos

Loading comments...