maven插件报错之解决

用m2eclipse创建Maven项目时报错

分类: Java 3074人阅读 评论(0) 收藏 举报

用m2eclipse创建Maven项目时报错


问题:

Could not calculate build plan: Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from/to central (http://repo1.maven.org/maven2): Access denied to http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.7.1/maven-surefire-plugin-2.7.1.pom. Error code 407, Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied.  ) log4j-test01 Unknown Maven Problem


解决方法:

1.找到maven库目录,进入:~\.m2\repository\org\apache\maven\plugins\maven-surefire-plugin\2.7.1

2.若2.7.1目录下只有,"maven-surefire-plugin-2.7.1.pom.lastUpdated" 则需要到http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.7.1/,把里面的文件下载下来放到2.7.1

3.删除2.7.1下的maven-surefire-plugin-2.7.1.pom.lastUpdated文件。

4.项目右键-->maven-->Update Dependencies

  • 5
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
在你的问题中,你提到了在IDEA中的Maven插件出现了红色错误提示。根据引用\[1\]中的代码片段,你可能需要在你的pom.xml文件中添加Spring Boot Maven插件的配置。确保你的pom.xml文件中包含以下代码: ```xml <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> ``` 此外,根据引用\[2\]和引用\[3\]的内容,你还需要检查以下几点: 1. 确保你的IDEA版本和Maven版本兼容。如果你的IDEA版本和Maven版本不兼容,你可能会遇到报错信息。你可以尝试将Maven版本更改为与你的IDEA版本兼容的版本。 2. 检查你的pom.xml文件中的artifactId是否正确。确保你的artifactId正确命名,并且没有拼写错误。 3. 确保你的pom.xml文件中的插件配置中包含正确的版本号。根据引用\[3\]中的内容,你可以尝试添加版本号,例如`<version>2.3.0.RELEASE</version>`。 通过检查以上几点,你应该能够解决在IDEA中的Maven插件爆红的问题。 #### 引用[.reference_title] - *1* *3* [idea中maven插件爆红解决](https://blog.csdn.net/kunAUGUST/article/details/118067358)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [idea中Maven出现插件爆红或无dependencies问题解决](https://blog.csdn.net/weixin_44500035/article/details/124999497)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值