下载错误

下载错误

在设置了阿里去代理服务器后,下载的时候总是提示如下错误:

https://img1.sycdn.imooc.com//climg/63798144096fd1d414210137.jpg


下面为pom.xml配置文件

相关代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.imooc</groupId>
  <artifactId>maven</artifactId>
  <version>1.0.0-RELEASE</version>
   
  <repositories>
      <repository>
          <id>aliyun</id>
          <name>aliyun</name>
          <url>https://maven.aliyun.com/repository/public</url>    
      </repository>
  </repositories>
   
  <dependencies>
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>8.0.28</version>
    </dependency>
     
    <dependency>
      <groupId>com.belerweb</groupId>
      <artifactId>pinyin4j</artifactId>
      <version>2.5.1</version>
    </dependency>
     
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>6.0.0</version>
    </dependency>
     
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>6.0.0</version>
    </dependency>    
  </dependencies>
</project>


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

1回答
好帮手慕小小 2022-11-20 10:06:49

同学你好,建议上传完整的报错截图,以便于问题的定位。

可能是依赖未下载成功或下载多版本冲突导致的,建议先清除IDEA缓存后重启IDEA后查看是否可以使用,若仍不可以则尝试使用如下方式进行解决:

1、找到本地存储依赖的位置并根据报错提示删除本地已下载的对应的依赖

https://img1.sycdn.imooc.com//climg/623060fa0953754d10130738.jpg

2、手动点击maven刷新

https://img1.sycdn.imooc.com//climg/622ff38409a9e01302100083.jpg

3、再设置自动重新载入

https://img1.sycdn.imooc.com//climg/622ff36409fd17fb06900280.jpg

4、清除IDEA缓存,重启IDEA

祝学习愉快~

  • 提问者 李泉成278 #1

    可以了,谢谢

    2022-11-20 10:24:53
  • 提问者 李泉成278 #2

    清理缓存后,前面正常,后面又出现了一些错误的提示,提示如下:


    [INFO] ------------------------------------------------------------------------

    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.5.5:assembly (default-cli) on project maven: Unable to parse configuration of mojo org.apache.maven.plugins:maven-assembly-plugin:2.5.5:assembly for parameter descriptorRefs: Cannot find 'descriptorRefs' in class org.apache.maven.archiver.MavenArchiveConfiguration -> [Help 1]

    [ERROR] 

    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

    [ERROR] Re-run Maven using the -X switch to enable full debug logging.

    [ERROR] 

    [ERROR] For more information about the errors and possible solutions, please read the following articles:

    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginConfigurationException


    2022-11-20 10:28:46
  • 好帮手慕小小 回复 提问者 李泉成278 #3

    同学你好,建议删除本地仓库中“org.apache.maven.plugins:maven-assembly-plugin:2.5.5”后再按照上述步骤操作试一下。

    祝学习愉快~

    2022-11-20 10:34:06
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师
插入代码