I have a huge problem with Maven on my Ubuntu 17.10. In my pom.xml I use the maven-assembly-plugin.
Every time I run Maven with mvn clean package
in the root of my project the execution fails and in the Stack-trace I can find the error message
Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
I already reinstalled Maven on my Ubuntu and searched through Google for many hours. It seems that Maven/Java can't connect to Maven Central over SSL. I found a way to use Maven and ignore SSL with mvn clean package -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
but this also didn't work.
The error occurs in all my Maven projects so I think the problem is not in the pom.xml.
The debug log with stacktrace is on Pastebin
EDIT: I checked my cacerts and found the .pem for digicert which validated the Certificate for Maven Central
java version "1.8.0_171" Java(TM) SE Runtime Environment (build 1.8.0_171-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
– justtoplayslow