Reputation: 561
I have a Maven project that needs to use a Maven artifact jar. This jar is there in my C:\Users\username.m2
How do I make Jenkins access this local .m2 folder?
I don't have the dependency-project with me now. So, I cannot build the jar to use it. But, I do have the artifacts.
Upvotes: 0
Views: 1275
Reputation: 35785
I already answered your two similar questions today. Please believe me: This is a bad idea.
If you just have the jars and no projects, the best thing you can do is upload them to your company Nexus/Artifactory.
If you don't have one (I would really recommend you to have one - without a Nexus/Artifactory, a Jenkins is not really useful), you can login on the Jenkins machine as the Jenkins user and install these files into the Jenkins local repository. For that, copy the files to that machine and run a command like mvn install:install-file
with the appropriate parameters (just google maven install plugin). Then they are inside the local repository of Jenkins and you can access them.
Upvotes: 3