How to fix Java Error “The trustAnchors parameter must be non-empty” while building Maven Single Jar

Recently I tried to deploy my Java  project as a single fat jar. To my bad awekening, Maven did not feel like creating jars anymore and complained with errors like :

You might encounter an error like this, if you recently reinstalled your java and want to build Jar with maven

Or

Or

Or

Or

Or

 

Or

 

Or

 

The console with spit something like this out :

 

 

 

How to fix the error

To fix the error, we will download the java JDK and extract the certificates into our local java installation.

Get java

 

Extract the jdk

 

 

Copy the Certificate into your java directory

 

And now you can finally build your jar with

 

Leave a Reply

Your email address will not be published. Required fields are marked *