Pipelines unable to retrieve Maven plugin from central?

I got a fairly simple maven project using

<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.13.3</version>

plugin in build section. When compiling this project using pipeline with

mvn -B verify

I get a strange error:

[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/jvnet/jaxb2/maven2/maven-jaxb2-plugin/0.13.3/maven-jaxb2-plugin-0.13.3.pom
...
[ERROR] Plugin org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:0.13.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:jar:0.13.3: Could not transfer artifact org.jvnet.jaxb2.maven2:maven-jaxb2-plugin:pom:0.13.3 from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1]

This looks like the build server has outdated SSL root certs, but could also be something different. Compiling the same project locally on my dev machine works fine.

Here my pipeline file:

image: maven:3.5.2-jdk-9

pipelines:
  default:
    - step:
        caches:
          - maven
        script: # Modify the commands below to build your repository.
          - mvn -B verify # -B batch mode makes Maven less verbose

1 answer

1 accepted

0 vote

Problem is with jdk-9 environment. After switching to JDK 8, it worked as expected.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

708 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot