Home > Enterprise >  Bitbucket pipeline with Jfrog failing to download plugins for build
Bitbucket pipeline with Jfrog failing to download plugins for build

Time:10-26

I'm trying to configure a bitbucket pipeline with a jfrog repository. I'm able to authenticate to the repository. The problem that I'm facing is that maven is failing to download plugins during the build. What am I missing?

This is my pipeline configuration.

image: atlassian/default-image:2

pipelines:
  default:
    - step:
        script:
          - pipe: jfrog/jfrog-setup-cli:1.0.0
          - source ./jfrog-setup-cli.sh
          - jfrog rt use myrepo-config
          - jfrog rt config show
          - jfrog rt ping
          - jfrog rt mvnc --server-id-resolve=myrepo --repo-resolve-releases=myrepo-mvn --repo-resolve-snapshots=myrepo-mvn --server-id-deploy=myrepo --repo-deploy-releases=myrepo-mvn-dev-local --repo-deploy-snapshots=myrepo-mvn-dev-local
          - jfrog rt mvn clean install
          - jfrog rt bce
          - jfrog rt bag --config=./issues-collection.yml
          - jfrog rt bp
          - jfrog rt bs
          - jfrog rt bpr promotion-repo

In Jfrog I have configured a remote repository that points to enter image description here enter image description here enter image description here

But my build fails when maven tries to fetch a plugin.

    jfrog rt mvn clean install
  [Info] Running Mvn...
  [Debug] Checking prerequisites.
  [Info] Downloading build-info-extractor from https://myrepo.jfrog.io/artifactory/extractors/org/jfrog/buildinfo/build-info-extractor-maven3/2.17.0/build-info-extractor-maven3-2.17.0-uber.jar
  [Debug] Usage Report: Sending info...
  [Debug] Sending HTTP GET request to: https://myrepo.jfrog.io/artifactory/extractors/org/jfrog/buildinfo/build-info-extractor-maven3/2.17.0/build-info-extractor-maven3-2.17.0-uber.jar
  [Debug] Sending HTTP GET request to: https://myrepo.jfrog.io/artifactory/api/system/version
  [Debug] The Artifactory version is: 7.25.4
  [Debug] Sending HTTP POST request to: https://myrepo.jfrog.io/artifactory/api/system/usage
  [Debug] Usage Report: Artifactory response: 200 OK
  [Debug] Usage Report: Usage info sent successfully.
  [Debug] Saving build general details at: /tmp/jfrog/builds/Z3JlZ3NvdWxzYnktdXMtbW9kZWxkcml2ZXJzLXBsdWdpbi0wMDEtYWRkLXBpcGVsaW5lLWNvbmZpZ3J1YXRpb25fNDM=/partials
  [Debug] Saving build general details at: /tmp/jfrog/builds/Z3JlZ3NvdWxzYnktdXMtbW9kZWxkcml2ZXJzLXBsdWdpbi0wMDEtYWRkLXBpcGVsaW5lLWNvbmZpZ3J1YXRpb25fNDM=/partials
  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
  [main] INFO org.jfrog.build.extractor.maven.BuildInfoRecorder - Initializing Artifactory Build-Info Recording
  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger -
  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building us-myrepo-plugin-001 1.0-SNAPSHOT
  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
Downloading: https://myrepo.jfrog.io/artifactory/myrepo-mvn/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.2/maven-checkstyle-plugin-3.1.2.pom
Downloading: https://myrepo.jfrog.io/artifactory/myrepo-mvn/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.2/maven-checkstyle-plugin-3.1.2.pom
Downloading: https://myrepo.jfrog.io/artifactory/myrepo-mvn/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.2/maven-checkstyle-plugin-3.1.2.pom
  [main] WARN org.codehaus.plexus.PlexusContainer - The POM for org.apache.maven.plugins:maven-checkstyle-plugin:jar:3.1.2 is missing, no dependency information available
Downloading: https://myrepo.jfrog.io/artifactory/myrepo-mvn/org/apache/maven/plugins/maven-checkstyle-plugin/3.1.2/maven-checkstyle-plugin-3.1.2.jar
  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time: 2.833 s
  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2021-10-26T00:22:03 00:00
  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Final Memory: 9M/110M
  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
  [main] ERROR org.apache.maven.cli.MavenCli - Plugin org.apache.maven.plugins:maven-checkstyle-plugin:3.1.2 or one of its dependencies could not be resolved: Could not find artifact org.apache.maven.plugins:maven-checkstyle-plugin:jar:3.1.2 in artifactory-release (https://myrepo.jfrog.io/artifactory/myrepo-mvn) -> [Help 1]
  [main] ERROR org.apache.maven.cli.MavenCli -
  [main] ERROR org.apache.maven.cli.MavenCli - To see the full stack trace of the errors, re-run Maven with the -e switch.
  [main] ERROR org.apache.maven.cli.MavenCli - Re-run Maven using the -X switch to enable full debug logging.
  [main] ERROR org.apache.maven.cli.MavenCli -
  [main] ERROR org.apache.maven.cli.MavenCli - For more information about the errors and possible solutions, please read the following articles:
  [main] ERROR org.apache.maven.cli.MavenCli - [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
  [Error] exit status 1
  2021-10-26T00:22:03.846245861Z stdout P 

CodePudding user response:

The URL of Maven Central is https://repo.maven.apache.org/maven2 not just https://repo.maven.apache.org.

  • Related