1

I want to setup a CI pipeline in GitLab for my Java project managed with Maven.

This is my gitlab-ci.yml

image: maven:3-jdk-9

variables:
   MAVEN_CLI_OPTS: "--batch-mode"

stages:
   - build

compile:
   stage: build
   script:
       - mvn $MAVEN_CLI_OPTS compile

I always get the following exception:

enter image description here

I tried many things like changing versions of the plugins, various docker images, including a settings.xml and local repository in the project itself, but nothing works.

Thanks in advance for any help!


UPDATE: Using the latest docker image everything works.

Jakob Benz
  • 127
  • 1
  • 14
  • Possible duplicate of [Error - trustAnchors parameter must be non-empty](https://stackoverflow.com/questions/6784463/error-trustanchors-parameter-must-be-non-empty) – secustor Mar 18 '18 at 12:45

1 Answers1

0

It seems like the CI server has no connection to the internet. Check this using the curl command in your .gitlab-ci.ymlfile.

But I'm pretty sure you guys at daimler have a local mirror, something like Artifactory.
In that case you have to use a settings.xml file.
Here is the official tutorial of Gitlab

secustor
  • 3,001
  • 2
  • 14
  • 20
  • I checked the connection with `curl` on the resources plugin pom, works just fine. Unfortunately it has to work using the central maven repository. – Jakob Benz Mar 18 '18 at 12:27
  • Update: when using then latest docker image, everything works. – Jakob Benz Mar 18 '18 at 12:34
  • The error message means that no Truststore could be found. It is normaly located under '$JAVA_HOME/lib/security/cacerts'. https://stackoverflow.com/questions/6784463/error-trustanchors-parameter-must-be-non-empty# – secustor Mar 18 '18 at 12:39