Plugin 'org.apache.maven.plugins:maven-compiler-plugin:' not found How old are you? How old are you! ! !
- I examine myself three times a day
- Did you study today?
- The answer was: Naturally, but I encountered obstacles on the way, and the old man has been suffering for a long time.
- Today, I must step through this pit, step through it thoroughly
Maven compile error
- When using maven to create a SpringBoot project, an error is reported during compilation
Plugin ‘org.apache.maven.plugins:maven-compiler-plugin:‘ not found
- It really affects the normal learning progress very much. In a fit of anger, I researched and recorded the problem thoroughly.
Error reasons and solutions
- The reason for the error is very straightforward, that is, the plugin was not found
- The first reaction is naturally that there is something wrong with the configuration of the maven settings.xml file
- Here first determine whether the settings.xml file exists in your local path
- If it doesn't exist, create one
- Based on the principle of minimalism, the configuration should be as simple as possible
- As follows ---- just configure a mirror source, simple and clear, if you need more than one, just add it
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>这里填写本地仓库路径</localRepository>
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
- After confirming that the settings.xml configuration is complete, start to refresh and download the plug-in
- At this time, it is possible to continue to report errors, and the code becomes popular, and then pay attention to the following operation
- Add plugin dependencies in dependencies
- Pay attention to the version, sometimes if the version information is not filled in, the plug-in may not be downloaded.
- How to check version? https://mvnrepository.com/ check here
- It can be downloaded normally here
- if still not working
- Then go to your local warehouse path and give the folder where the warehouse is located a right
chmod 777 xxx
- Then go to your local warehouse path and give the folder where the warehouse is located a right
- What? Maybe it can't compile normally? ? ?
- Check the basic configuration
- Click on these places to see if they are configured correctly.
- If you still report an error? Impossible?
- It may be a super low-level problem to report an error again. Are some letters wrong?
- an extra space?
record sharing only