错误:Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sz15732624895/article/details/82191240

错误提示:

Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved

查阅了很多都没有解决,后来终于找到了一篇博客,解决了问题。

解决方案:

在 pom.xml 文件中添加:

<dependency>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-resources-plugin</artifactId>
    <version>2.4.3</version>
</dependency>

在 settings.xml 文件中添加:

<mirror> 
    <id>Central</id> 
    <url>http://repo1.maven.org/maven2</url> 
    <mirrorOf>central</mirrorOf> 
</mirror>

然后执行命令: Maven install  完美解决

猜你喜欢

转载自blog.csdn.net/sz15732624895/article/details/82191240