尝试连接时出现以下错误
jenkins-jdk11
nexus3
在docker中运行同一网络的容器组成基于JDK8的主机系统。点击“测试连接”后
错误:
Nexus Repository Manager 3.x connection failed
javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
- with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:278)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:421)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662)
at com.sonatype.nexus.api.zz.ex.a(SourceFile:33)
at com.sonatype.nexus.api.zz.ex.b(SourceFile:24)
at com.sonatype.nexus.api.zz.ez.handleResponse(SourceFile:54)
at org.apache.http.impl.client.CloseableHttpClient.execute(SourceFile:223)
at org.apache.http.impl.client.CloseableHttpClient.execute(SourceFile:165)
at com.sonatype.nexus.api.zz.et.a(SourceFile:84)
at com.sonatype.nexus.api.zz.es.getVersion(SourceFile:126)
at com.sonatype.nexus.api.repository.v3.RepositoryManagerV3Client$getVersion.call(Unknown Source)
docker-compose.yml文件
version: "3"
services:
jenkins-jdk11:
user: root
image: 'jenkins/jenkins:jdk11'
ports:
- '10000:8080'
- '50000:50000'
environment:
- TZ=Europe/Warsaw
- "JAVA_OPTS=-Djavax.xml.bind.JAXBContextFactory=com.sun.xml.bind.v2.ContextFactory"
links:
- nexus3
volumes:
- 'jenkins-data:/var/jenkins_home'
- '/var/run/docker.sock:/var/run/docker.sock'
deploy:
restart_policy:
condition: on-failure
networks:
- backend
nexus3:
container_name: nexus3
image: 'sonatype/nexus3'
ports:
- '50001:8081'
volumes:
- 'local-nexus-data-volume:/nexus-data'
networks:
- backend
volumes:
jenkins-data:
driver: local
local-nexus-data-volume:
driver: local
networks:
backend:
driver: overlay
有什么问题?如何成功连接Nexus?
我的JAXB插件已安装: