Mven build - PKIX path building failed - maven

I am getting the following error, When I run "mvn clean install" in the terminal.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:check (validate) on project test-dependencies: Failed during checkstyle execution: Failed to load suppressions file from: /Users/test/Documents/Team/workspace/test/test-dependencies/target/checkstyle-suppressions.xml: Unable to read /Users/test/Documents/Team/workspace/test/test-dependencies/target/checkstyle-suppressions.xml: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
The file does exist and I am able to access it.
The build runs fine when I skip checkstyle.
mvn clean install -Dcheckstyle.skip=true
Not sure how to triage this. Any help?

Related

Failed to collect dependencies at org.bouncycastle:bc-fips:jar:1.0.2.3

I got an error when I try to build my project using Jenkins
> [ERROR] Failed to execute goal on project luwak-task-storage: Could not resolve dependencies for project
> com.trendmicro.luwak:luwak-task-storage:jar:3.0.0-SNAPSHOT: Failed to
> collect dependencies at org.bouncycastle:bc-fips:jar:1.0.2.3: Failed
> to read artifact descriptor for org.bouncycastle:bc-fips:jar:1.0.2.3:
> Could not transfer artifact org.bouncycastle:bc-fips:pom:1.0.2.3
> from/to central
> (https://nexus.trendmicro.com/nexus/repository/maven-central/):
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to
> find valid certification path to requested target -> [Help 1]
I got a dependency called org.bouncycastle:bc-fips:pom:1.0.2.3, it is the library that cannot be resolved, but I don't know why.
I can build my project successfully on local, but when using Jenkins, I got this error.
I have read some threads but none of them resolve my issue. Please help.
I got a dependency called org.bouncycastle:bc-fips:pom:1.0.2.3, it is
the library that cannot be resolved, but I don't know why?
Because your server don't have that dependency/library yet and failed prior to get those required artifacts due to the following reason:
Your system (Jenkins server) is unable to validate the server identity from where it is trying pulling the artifacts and hence unable to establish a proper channel for communication.
If you recognized & trust target server then you can add the CA certs on Jenkins server (most probably in java keystore utilize by Jenkins) to validate the handshake process.
https://stackoverflow.com/a/63491078/9926179

I have an error trying to run shopizer-inventory-xml

I am working with shopizer and I try to use https://github.com/shopizer-ecommerce/shopizer-inventory-csv to upload inventory from a csv file.
I edit . and the I run ./mvnw clean install
But I am getting this error
[ERROR] Failed to execute goal on project shopizer-inventory-csv: Could not resolve dependencies for project com.shopizer:shopizer-inventory-csv:jar:2.0.3-SNAPSHOT: The following artifacts could not be resolved: com.shopizer:sm-core-model:jar:2.0.3-SNAPSHOT, com.shopizer:sm-shop:jar:2.0.3-SNAPSHOT: Could not find artifact com.shopizer:sm-core-model:jar:2.0.3-SNAPSHOT -> [Help 1]

maven verify (sonar) fail to resolve defined argument

I am trying to verify using this parameter (which work for other projects)
mvn -X verify sonar:sonar -Drevision=4.0.10
Maven fails to download dependency because of the argument not resolved
Failed to execute goal on project APP-ear: Could not resolve
dependencies for project com.orginternational:APP-ear:ear:4.0.10:
Failed to collect dependencies at
com.orginternational:APP-was:war:4.0.10: Failed to read artifact
descriptor for com.orginternational:APP-was:war:4.0.10: Could not
transfer artifact com.orginternational:APP:pom:${revision} from/to en
(https://nexus.example.com/repository/maven-central/): Failed to
transfer file
https://nexus.example.com/repository/maven-central/com/orginternational/APP/$%7Brevision%7D/APP-$%7Brevision%7D.pom
with status code 400 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal on project APP-ear: Could not resolve dependencies for
project com.orginternational:APP-ear:ear:4.0.10: Failed to collect
dependencies at com.orginternational:APP-was:war:4.0.10
Any clue how to fix this please?

Missing artifact in Maven Project

I am hitting the error Missing artifact in my maven project. What's going wrong?
Error:
It is not working only in one of my laptop and the rest are fine. The setup and everything is the same.
Method tried:
I have tried to update the maven project where i used to do if i have this dependency issue but this time it failed.
I have tried to run the "mvn install" and it shows the error message below:
[ERROR] Failed to execute goal on project Spearhead-web: Could not resolve dependencies for project com.triaset.spearhead:Spearhead-web:war:1.0-SNAPSHOT: Failed to collect dependencies at com.triaset.spearhead:Spearhead-ejb:jar:1.0-SNAPSHOT: Failed to read artifact descriptor for com.triaset.spearhead:Spearhead-ejb:jar:1.0-SNAPSHOT: Could not transfer artifact com.triaset.spearhead:Spearhead-ejb:pom:1.0-SNAPSHOT from/to prime-repo (https://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]

Maven : PKIX path building failed

Maven build throwing this exception
Failed to execute goal on project mdf-portal-3rdParty: Could not
resolve dependencies for project
com.alu.ipprd.bsm.soa:mdf-portal-3rdParty:jar:0.0.1-SNAPSHOT: Failed
to collect dependencies at
com.alu.ipprd.bsm.soa.portal.soo:common:jar:0.0.1-SNAPSHOT: Failed to
read artifact descriptor for
com.alu.ipprd.bsm.soa.portal.soo:common:jar:0.0.1-SNAPSHOT: Could not
transfer artifact
com.alu.ipprd.bsm.soa.portal.soo:common:pom:0.0.1-SNAPSHOT from/to
googlecode.com
(http://gmaps4jsf.googlecode.com/svn/trunk/gmaps4jsf-repo):
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target -> [Help 1]
I did not made any single change in pom.xml file ,suddenly after taking update from SVN i am getting this exception.
I will want to know
What is the cause of this problem?
Is this issue due to anything change in SVN server?
Even no any change in local machine why this build fail error?
Something wrong with Gmaps4jsf repository ?(May be due to closing of Google code)
maybe your maven version isnot the proper version. I encounter this problem in 3.2.3. and resolve it in 3.3.9 version.
you need to add ssl certificate to your jre installation
Please refer this answer and follow steps!
Step 1 - Get Root CA certificate
Step 2 - install that certificate at jre cacerts file

Resources