Maven Error: (repeated) java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

后端 未结 6 665
温柔的废话
温柔的废话 2021-02-08 10:38

Have to ask again. Someone thought it was a duplicate question and already answered and removed it from the list.

I\'m using maven (mvn) batch command with windows (not

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-08 11:23

    I faced the same issue on Windows. I had two Java installed. Oracle Java and OpenJDK and Maven was compiling with OpenJDK and it was giving this issue.

    Since I wanted to continue compiling the source code using OpenJDK, to fix the issue, I specified the truststore path to Oracle JRE's cacerts library in the Maven command as follows.

    mvn clean install -DskipTests -Djavax.net.ssl.trustStore=/path-to-oracle-java/jre/lib/security/cacerts
    

提交回复
热议问题