I am a relative newbie to ci/cd pipelines and I am trying to configure the pipeline for a project I am working on, but I’ve run into an issue. My Maven and Java are properly configured however, I am getting an error because one of the libraries we are using is not located in the Maven central repository. How can I add or reference libraries in my pipeline that are not found in the Maven central repo? For clarification, the library I am trying to add is for NASA WorldWind. Here is a snippet of the error I receive in the pipeline run. I have to remove some of the identifying info in the project names, but the rest is the same.
[ERROR] Failed to execute goal on project foobar: Could not resolve dependencies for project foo:bar:jar:0.4.0: The following artifacts could not be resolved: gov.nasa:worldwind:jar:2.2.1, gov.nasa:worldwindx:jar:2.2.1, gdal:gdal:jar:1, systems.uom:systems-common:jar:2.2-SNAPSHOT: Could not find artifact gov.nasa:worldwind:jar:2.2.1 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
I tried to add dependencies, but I’m really inexperienced with this so I don’t really know how to proceed or if adding a dependency is even the correct approach. Any advice is appreciated! I’ll leave the pipeline code below because it’s relatively simple right now. Just in case there’s something in there I’m missing.
include:
- template: Auto-DevOps.gitlab-ci.yml
variables:
MAVEN_SETTINGS_PATH: "workspace.xml"
MAVEN_CUSTOM_GOALS: "dependency:resolve"
AUTO_DEVOPS_BUILD_IMAGE_CNB_BUILDER: "heroku/builder:22"
AUTO_DEVOPS_BUILD_IMAGE_FORWARDED_CI_VARIABLES: "DEPLOY_TOKEN_PASS,MAVEN_SETTINGS_PATH"
AUTO_DEVOPS_BUILD_IMAGE_CNB_ENABLED: "true"
JAVA_HOME: "*/openjdk-21.0.2"
build:
before_script:
- export PATH=$JAVA_HOME/bin:$PATH