I've just set-up a Jenkins pipeline to test a small Quarkus app. My Jenkins runs in a corporate Kubernetes-based CI/CD environment with corporate Nexus repositories. The first stage just tries to launch @QuarkusTests (that work locally in my IDE) with:
mvn clean test -Dquarkus.test.profile=xxx
everything seems to build OK, but when the surefire plugin launches the QuarkusTests, the Quarkus bootstrap tries to get dependencies from the Nexus repo and fails with an HTTP 401 error.
Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Could not transfer artifact io.quarkus:quarkus-bom:pom:2.15.0.Final from/to shp.mirror (http://<***************>/): authentication failed for http://<***************>/io/quarkus/quarkus-bom/2.15.0.Final/quarkus-bom-2.15.0.Final.pom, status: 401 Unauthorized
Dependencies were collected correctly from Nexus by Maven with no problems up until this stage.
I checked that the Jenkins user was able to reach the dependeny that failed.
Things that I tried:
<configuration>
<systemPropertyVariables>
<maven.home>${maven.home}</maven.home>
<maven.repo.local>${settings.localRepository}</maven.repo.local>
<maven.settings>${session.request.userSettingsFile.path}</maven.settings>
<maven.top-level-basedir>${session.topLevelProject.basedir.absolutePath}</maven.top-level-basedir>
<quarkus.bootstrap.effective-model-builder>true</quarkus.bootstrap.effective-model-builder>
</systemPropertyVariables>
</configuration>
Any ideas on what may be causing this error, or on how to collect all the dependencies needed by Quarkus bootstrap would be geatly appreciated.
Thanks
Do you have java.net.ssl.*
properties set in MAVEN_OPTS
as documented in https://maven.apache.org/guides/mini/guide-repository-ssl.html ? If so, they will also need to be propagated to the surefire plugin.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.