Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40011

Deploy artifacts to Maven repository ignores Global MAVEN_OPTS

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • None
    • Maven Integration plugin 2.14
      Jenkins ver. 2.19.3

      We use a keystore with client certificates to authenticate with remote severs. We normally use MAVEN_OPTS to pass JDK -Djavax.net.ssl.keyStore parameters to Maven

      This works for a Maven project, and Invoke top-level Maven targets steps.

      However the setting is ignored in the Deploy artifacts to Maven repository step/publisher. Setting a normal MAVEN_OPTS via EnjInject plugin also seems to have no effect

      Sample output (with haproxy's verify optional):

      Maven RedeployPublisher use remote IQ-449a33ad36b4 maven settings from : /tmp/settings2743001247239769636.xml
      [INFO] Deployment in https://mvnrepo.acme-it.com/content/repositories/snapshots/ (id=,uniqueVersion=true)
      Deploying the main artifact aggregator-29.3.0-SNAPSHOT.pom
      Downloading: https://mvnrepo.acme-it.com/content/repositories/snapshots/com/acme/aggregator/29.3.0-SNAPSHOT/maven-metadata.xml
      ERROR: Failed to retrieve remote metadata com.acme:aggregator:29.3.0-SNAPSHOT/maven-metadata.xml: Could not transfer metadata com.acme:aggregator:29.3.0-SNAPSHOT/maven-metadata.xml from/to  (https://mvnrepo.acme-it.com/content/repositories/snapshots/): Not authorized , ReasonPhrase:Unauthorized.
      org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to retrieve remote metadata com.acme:aggregator:29.3.0-SNAPSHOT/maven-metadata.xml: Could not transfer metadata com.acme:aggregator:29.3.0-SNAPSHOT/maven-metadata.xml from/to  (https://mvnrepo.acme-it.com/content/repositories/snapshots/): Not authorized , ReasonPhrase:Unauthorized.

      Also adding a per-step JVM Options field (like Invoke top-level Maven targets) would be nice

          [JENKINS-40011] Deploy artifacts to Maven repository ignores Global MAVEN_OPTS

            Unassigned Unassigned
            jbochenski Jakub Bochenski
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: