Cannot resolve plugin org.apache.maven.plugins:maven-jar-plugin:2.4
时间: 2023-09-25 07:09:07 浏览: 174
my.cnf-调优
Cannot resolve plugin org.apache.maven.plugins:maven-jar-plugin:2.4这个错误通常出现在导入本地仓库时出错的情况下。解决这个问题的方法是,在apache-maven-3.5.2/conf/setting.xml中加入以下配置:
```xml
<profiles>
<profile>
<id>alimaven</id>
<repositories>
<repository>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
```
添加这个配置后,重新运行maven命令,应该就能解决问题了。
阅读全文