I am attempting to build a Maven Build Pipeline in Azure Devops.
I have one project that has files shared across several others (as set of micro service projects), so the maven compile for that project creates a .jar file ( which is added to my local maven repository .m2) when I do the build on my laptop. We can call it shared.jar for now.
Then when I compile the micro services on my laptop, they each have a dependency on the jar file in my .m2 repo. And they pick up the dependency from there and the Maven build (mvn clean install).
Unfortunately, The code build pipeline does not maintain a local .m2 repo. So when I try to do a “mvn clean install” on each micro service they cannot locate shared.jar, so the build fails.
I have been able to successfully add the .jar file to a Feed and Artifact under Azure DevOps, but I can't seem to figure out how to pull it into the Micro Services Build.
HOW do I pick up the dependency for a local jar file in my CI/CD Maven build pipeline and get it into a maven repo that my build will find?
I have attempted to follow this link: https://learn.microsoft.com/en-us/azure/devops/artifacts/get-started-maven?view=azure-devops