一、问题背景
使用Jenkins构建jar包速度太慢,耗时太久。
二、问题处理
1、进入容器
docker exec -it bfd929c0d3d5 /bin/bash
2、切换到maven的配置目录、修改配置文件
cd /usr/local/maven/conf/
vim settings.xml #配置文件内容如下:
"http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
alimaven
aliyun
central
http://maven.aliyun.com/nexus/content/groups/public
org.apache.maven.plugins
org.codehaus.mojo
3、验证
重新构建,可以发现已经切换到阿里的maven仓库了,速度明显提升。
[
[
[
[
[
[