How to resolve custom created dependencies for springboot project in Jenkins?
I have built a custom SDK dependency on my spring-boot project. The project is built without any issue locally once I install dependency which is then cached in .m2.
Now, when I try to build the project in Jenkins running in the server(AWS EC2) I get Could not resolve dependencies for project <project_name>:war:0.0.1-SNAPSHOT: Failure to find <dependency_name>:0.0.1
error.
My pom.xml
looks like
<dependency> <groupId>com.mysdk</groupId> <artifactId>my-sdk</artifactId> <version>0.0.1</version> </dependency>
The issue here is because the dependency is not found when Jenkins builds the project. Can someone help me with how to install this dependency in Jenkins or how to resolve this kind of issue?
actually you could have an artifact repository, so the jenkins can reach your own artifacts, something like Artifactory https://jfrog.com/open-source/, for example.
If you don’t want to have your own server, you should create the my-sdk pipeline in Jenkins, when this pipeline intall the artifact, it will be then available for other Jenkins pipeline.