Kubesphere 在 devops 部署项目的时候下载 maven 依赖卡住

Kubesphere 在 devops 部署项目的时候下载 maven 依赖卡住

我下载 下面这段 maven 依赖一直卡住:

bash 复制代码
 <build>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.2</version>
                <configuration>
                    <append>true</append>
                </configuration>
                <executions>
                    <execution>
                        <id>agent-for-ut</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>agent-for-it</id>
                        <goals>
                            <goal>prepare-agent-integration</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-site</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <fork>true</fork>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonarsource.scanner.maven</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>3.6.0.1398</version>
            </plugin>
        </plugins>
    </build>

解决方案:

先看 maven的 settings.xml 配置的是哪个镜像源,我这里配置的是阿里云的镜像源:

xml 复制代码
  <mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->
     <mirror>  
	    <id>nexus-aliyun</id>  
	    <mirrorOf>central</mirrorOf>    
	    <name>Nexus aliyun</name>  
	    <url>http://maven.aliyun.com/nexus/content/groups/public</url>  
	</mirror> 
  </mirrors>

然后再查看 阿里云 maven 仓库 中是否有这个依赖:

可以查到是有的:

所以就是其他问题了,后面我把下面 的内容都删除之后,再次尝试,就正常了。

相关推荐
安顾里1 小时前
Linux命令-iostat
linux·运维·服务器
100编程朱老师2 小时前
面试:什么叫Linux多路复用 ?
linux·运维·服务器
群联云防护小杜2 小时前
云服务器主动防御策略与自动化防护(下)
运维·服务器·分布式·安全·自动化·音视频
PPIO派欧云2 小时前
PPIO X OWL:一键开启任务自动化的高效革命
运维·人工智能·自动化·github·api·教程·ppio派欧云
struggle20253 小时前
LinuxAgent开源程序是一款智能运维助手,通过接入 DeepSeek API 实现对 Linux 终端的自然语言控制,帮助用户更高效地进行系统运维工作
linux·运维·服务器·人工智能·自动化·deepseek
m0_740154674 小时前
Maven概述
java·maven
不知名。。。。。。。。5 小时前
Linux—— 版本控制器Git
linux·运维·git
遇到我又惊又喜5 小时前
佛山大旺高新区3650 M5 ERP服务器维修案例
运维·服务器
安全系统学习7 小时前
网络安全之红队LLM的大模型自动化越狱
运维·人工智能·安全·web安全·机器学习·php
2302_799525747 小时前
【Linux】第十二章 安装和更新软件包
linux·运维·服务器