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?