解决Idea中Cannot resolve plugin org.apache.maven.pluginsmaven-clean-plugin3.1.0配置问题

在项目的pom.xml中,

```Java

<build>
   <plugins>
      <plugin>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-maven-plugin</artifactId>
         <version>2.4.4</version>
      </plugin>
   </plugins>
</build>

```

这段配置文件一直出错,显示**Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:3.1.0问题。**博主折腾了一天才搞定,这种配置文件出问题真的太难解决了。。

解决方法:

首先在maven的配置文件夹下找到conf/seeting.xml文件,如下图所示:

然后修改里面的仓库文件,添加阿里云仓库,如下图

<id>alimaven</id>

<mirrorOf>central</mirrorOf>

<name>aliyun maven</name>

<url>http://maven.aliyun.com/repository/public</url>

</mirror>

然后再在pom.xml任意一个位置添加下面代码:

<repositories>
<repository>
<id>alimaven</id>
<url>https://maven.aliyun.com/repository/public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>alimaven</id>
<url>https://maven.aliyun.com/repository/public</url>
</pluginRepository>
</pluginRepositories>

然后再点击maven刷新就可以了!

  • 4
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Over 90 hands-on recipes to successfully build and automate development life cycle tasks following Maven conventions and best practices About This Book Understand the features of Apache Maven that makes it a powerful tool for build automation Full of real-world scenarios covering multi-module builds and best practices to make the most out of Maven projects A step-by-step tutorial guide full of pragmatic examples Who This Book Is For If you are a Java developer or a manager who has experience with Apache Maven and want to extend your knowledge, then this is the ideal book for you. Apache Maven Cookbook is for those who want to learn how Apache Maven can be used for build automation. It is also meant for those familiar with Apache Maven, but want to understand the finer nuances of Maven and solve specific problems. What You Will Learn Install Apache Maven successfully on your preferred OS Explore the various features of Apache Maven to build efficient automation tools Discover when and how to use the various Apache Maven plugins Generate and publish your project documentation using Apache Maven Analyze and control code quality and code coverage using Apache Maven Build various types of Java projects as well as other binaries Set up complex projects using the concept of inheritance In Detail Apache Maven offers a comprehensive set of features to build, test, release, and deploy software projects and maintain enterprise development infrastructure. This book is a hands-on guide that enables you to explore the vast potential of Apache Maven, the leading software build tool. You will start off by successfully installing Apache Maven on your favorite OS, and then you will create your first working project. Furthermore, the book walks you through setting up and using Maven with popular Java Integrated Development Environments (IDEs) so you can exploit Maven features to build standard Java applications. Above all, you will also learn to create site reports and documentation for your project along with handling typical build requirements and other advanced Maven usages. Table of Contents Chapter 1: Getting Started Chapter 2: IDE Integration with Maven Chapter 3: Maven Lifecycle Chapter 4: Essential Maven Plugins Chapter 5: Dependency Management Chapter 6: Code Quality Plugins Chapter 7: Reporting and Documentation Chapter 8: Handling Typical Build Requirements Chapter 9: Multimodule Projects Chapter 10: Java Development with Maven Chapter 11: Advanced Maven Usage

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值