I am doing a maven build, but it gets an error related to one of the dependencies. If I (and other developers) build this on our local machines or on other linux servers, it builds with no problems. However, on one particular linux server, it gets the following error when building.
mvn clean install DskipTests=true -U
maven Build Error:
[ERROR] Failed to execute goal on project corporateInterface: Could not resolve dependencies for project com.travellinck:corporateInterface:war:3.10: Failed to collect dependencies at com.github.Cloudmersive:Cloudmersive.APIClient.Java:jar:v3.62: Failed to read artifact descriptor for com.github.Cloudmersive:Cloudmersive.APIClient.Java:jar:v3.62: Could not transfer artifact com.github.Cloudmersive:Cloudmersive.APIClient.Java:pom:v3.62 from/to jitpack.io (https://jitpack.io): Transfer failed for https://jitpack.io/com/github/Cloudmersive/Cloudmersive.APIClient.Java/v3.62/Cloudmersive.APIClient.Java-v3.62.pom: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1] [ERROR]
So I think there must be something different on this server that is causing the dependency error. Any ideas please?
I see it gets a java.security.InvalidAlgorithmParameterException
, so this suggests that there is probably some restriction configured on the server that is preventing the dependency being downloaded to the server.
More info:
pom.xml
<dependency>
<groupId>com.github.Cloudmersive</groupId>
<artifactId>Cloudmersive.APIClient.Java</artifactId>
<version>v3.62</version>
<exclusions>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</exclusion>
</exclusions>
</dependency>
Maven version on linux server with the error:
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: /home/jboss/.sdkman/candidates/maven/current Java version: 1.7.0_95, vendor: Oracle Corporation, runtime: /usr/java/java-7-openjdk-amd64/jre Default locale: en_US, platform encoding: ANSI_X3.4-1968 OS name: "linux", version: "3.10.0-1160.15.2.el7.x86_64", arch: "amd64", family: "unix"
Maven version of linux server that has no error:
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: /opt/apache-maven-3.6.3 Java version: 1.7.0_161, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.161-2.6.12.0.el7_4.x86_64/jre Default locale: en_US, platform encoding: ANSI_X3.4-1968 OS name: "linux", version: "3.10.0-957.21.3.el7.x86_64", arch: "amd64", family: "unix"
Maven version on localhost that has no error:
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T18:41:47+02:00) Maven home: /Users/richardmarais/Development/java/Maven/apache-maven-3.3.9 Java version: 1.7.0_80, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre Default locale: en_GB, platform encoding: UTF-8 OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"