Hello,
I would like to use azure artifacts maven feed to build Spring boot app in my existing BitBucket Pipelines. The project pom is parented from artifact stored in Azure artifacts feed.How can I do it?
Thank you.
Hello Victor,
I'm Norbert from Atlassian Support, it's nice to meet with you.
You mentioned that the project pom is parented from artifact stored in Azure artifacts feed, but it's failing to download maven module from Azure Artifacts feed.
Could you let us know what's the error message you receive when you try to do this but fails?
We're looking forward to hear from you.
Hi Norbert,Here is my bitbucket-pipeline.yml:
image: maven:3.6.3 # Use a Maven image for building the Java apppipelines:default: - step:script: - mvn -B verify -s azure-artifacts/settings.xml
The pipeline looks for parent artifact in the default location. It ignores the setting.xml I instructed maven to use.The error I see when pipeline fails:+ mvn -B verify -s azure-artifacts/settings.xml2[INFO] Scanning for projects...3[INFO] Downloading from central: https://repo.maven.apache.org/maven2/ca/mb/wcb/wcb-azure-parent/1.0.2/wcb-azure-parent-1.0.2.pom4[ERROR] [ERROR] Some problems were encountered while processing the POMs:5[FATAL] Non-resolvable parent POM for ca.mb.wcb:worker-service-api:0.0.1-SNAPSHOT: Could not find artifact ca.mb.wcb:wcb-azure-parent:pom:1.0.2 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at no local POM @ line 6, column 1067[ERROR] The build could not read 1 project -> [Help 1]8[ERROR]9[ERROR] The project ca.mb.wcb:worker-service-api:0.0.1-SNAPSHOT (/opt/atlassian/pipelines/agent/build/pom.xml) has 1 error10[ERROR] Non-resolvable parent POM for ca.mb.wcb:worker-service-api:0.0.1-SNAPSHOT: Could not find artifact ca.mb.wcb:wcb-azure-parent:pom:1.0.2 in central (https://repo.maven.apache.org/maven2) and 'parent.relativePath' points at no local POM @ line 6, column 10 -> [Help 2]11[ERROR]12[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.13[ERROR] Re-run Maven using the -X switch to enable full debug logging.14[ERROR]15[ERROR] For more information about the errors and possible solutions, please read the following articles:16[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException17[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
Thank you for this!
The error message indicates that during the build, Maven is trying to retrieve the parent POM (wcb-azure-parent-1.0.2.pom) from Maven Central (<a href="https://repo.maven.apache.org/maven2" target="_blank" rel="nofollow noopener noreferrer">https://repo.maven.apache.org/maven2</a>). However, since this POM is hosted on Azure Artifacts, it's not available in Maven Central, which leads to the build failure.
wcb-azure-parent-1.0.2.pom
<a href="https://repo.maven.apache.org/maven2" target="_blank" rel="nofollow noopener noreferrer">https://repo.maven.apache.org/maven2</a>
Ensure that the settings.xml you're providing with -s azure-artifacts/settings.xml contains the correct repository information for Azure Artifacts. It should have something like:
settings.xml
-s azure-artifacts/settings.xml
<repositories><repository><id>azure-maven-feed</id><url>YOUR_AZURE_ARTIFACTS_FEED_URL</url></repository></repositories>
Also, ensure authentication details for Azure Artifacts are provided, usually through <servers> configuration.
<servers>
Please let us know if that helps.
It looks like you're new here. Sign in or register to get started.