Issue
I have Jenkins ver.2.121.1
installed on Windows Server 2012 R2
along with Apache Maven 3.5.2
.
In localhost:8080/systeminfo
link, $MAVEN_HOME
environment variable is set correctly (to C:\\apache-maven-3.5.2\
) and maven saves my custom libraries in ~\.m2\.repository\
but Jenkins saves the custom libraries(like ojdbc, ...) in
another directory (in C:\\Program Files(x86)\Jenkins\maven-repositories\0\
).
In jenkins config.xml
(in C:\\Program Files(x86)\Jenkins\config.xml
), no line is specified about maven local repositories (for example nothing is defined like <localRepository>${env.HOME}/.m2/repository</localRepository>
).
Is there any clear reason why Jenkins uses its own maven repository directory? Should I addres my own maven directory to force jenkins give priority to it?
Solution
Try http://localhost:8080/configure
and you can see and specify "Local Maven Repository" there.
Answered By - vikingsteve
Answer Checked By - Marie Seifert (JavaFixing Admin)