0

The error is as follows:

Cannot resolve plugin org.apache.maven.plugins:maven-clean-plugin:2.5
Cannot resolve plugin org.apache.maven.plugins:maven-resources-plugin:2.6
Cannot resolve plugin org.apache.maven.plugins:maven-jar-plugin:2.4
Cannot resolve plugin org.apache.maven.plugins:maven-compiler-plugin:3.1
Cannot resolve plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4
Cannot resolve plugin org.apache.maven.plugins:maven-install-plugin:2.4
Cannot resolve plugin org.apache.maven.plugins:maven-deploy-plugin:2.7
Cannot resolve plugin org.apache.maven.plugins:maven-site-plugin:3.3

I used all the ways which can find on Internet,such as change the localrepository or add other mirrors,but nothing is working, I was mad for the rest of the day because of this problem.

I hope someone can give me the answer to solve it.

Thank you

Ben
  • 740
  • 1
  • 14
  • 29
  • have you tried this? https://stackoverflow.com/questions/30522679/plugin-org-apache-maven-pluginsmaven-clean-plugin2-5-or-one-of-its-dependencie – bananas Feb 24 '20 at 12:18
  • yes,but I can't download the plugin jar directly in a web browser,so I add the mirror of the aliyun of China,but it also doesn't work, so bad... – coldman Feb 24 '20 at 13:22
  • This issue can cause those errors: https://stackoverflow.com/a/59764670/98811 . In a nut shell, the repos have switched to https only. Update your repository URLs to https://central.maven.org/maven2/ – Devon_C_Miller Feb 24 '20 at 14:34

1 Answers1

0

It seems that your maven configuration is missing the plugin repository definition. Update your active profile by adding a pluginRepositories section as follows :

...
<Profile>
    ....
    <pluginRepositories>
       <pluginRepository>
           <id>Maven central</id>
           <name>Maven Repository Switchboard</name>
           <layout>default</layout>
           <url>http://central.maven.org/maven2/</url>
           <snapshots>
               <enabled>false</enabled>
           </snapshots>
        </pluginRepository>
    </pluginRepositories>
    ....
</Profile>

You can always refer to the official documentation for further readings

Ben
  • 740
  • 1
  • 14
  • 29