IDEA reported an error: Cannot resolve plugin org.apache.maven.plugins:*

Some problems with maven may be caused by network and other factors when importing the project.

I have encountered this problem for many years using the maven-deploy plugin. Even if I did not include the plugin directly in my POM, an error occurred. As a solution I had to force the plugin to include a version into my POM plugin section just to remove the red squiggles.

Cannot resolve plugin org.apache.maven.plugins:*

 
  1. org.apache.maven.plugins:maven-clean-plugin:2.4.1

  2. org.apache.maven.plugins:maven-deploy-plugin

  3. org.apache.maven.plugins:maven-install-plugin

  4. org.apache.maven.plugins:maven-site-plugin

  5. ...........

Solution:

After trying every solution on StackOverflow, I found the problem:

On my computer, there is a directory of .m2/repository/org/apache/maven/plugins/maven-deploy-plugin under the personal user directory, there is a version of'X.Y' and '2.8.2' etc. Deleted the entire maven-deploy-plugin directory, and then re-imported my Maven project. Rebuild to keep the network open.

Guess you like

Origin blog.csdn.net/sanmi8276/article/details/108529328