假设自定义的仓库路径为“/opt/repository”,那么在“系统管理-系统设置”中,修改“全局MAVEN_OPTS”的值为如下的内容:
-Dmaven.repo.local=/opt/repository
另外参考的文章:
Jenkins持续集成环境, 如何自定义 maven repositories