Prerequisites
Premise: Make sure the dependencies in Maven are correct, Don’t make mistakes such as missing letters.
If you are worried, you can go to the official website to search, and copy and paste it again.
Official website link: https://mvnrepository.com/
scene
Importing a new project,or other reasons,maven refresh is also useless, it reports error as show below:
Solution:
1. First, Clear the cache, Click and restart IDEA.
2. Close IDEA, Open the project folder
Find .idea
in the project, delete workspace.xml
3. Re-open IDEA, find Maven on the right
Double-click clean
Wait for the console to appear BUILD SUCCESS
Find install
under maven again, Double-click it and the download log shown below will appear.
Wait it over, and BUILD SUCCESS
will appear:
Click the Reload button in the Maven component again, wait for the bottom progress bar to end
4. Solve the Dependencis report in Maven
First, Open the file pom.xml
Then delete the content in the tag dependencies
[recommended to use Ctrl + x
]
Click the Reload button in the Maven component again, wait for the bottom progress bar to finish. [dependencies
disappears at this time]
Then in pom.xml
, use the shortcut key Ctrl + z
to return
(If you are using
Ctrl + x
, you can useCtrl + v
to paste)
Let the dependencies
content appear again,return to the previous state.
The last step: click the Reload button in the Maven component again, wait for the bottom progress bar to finish. [At this time,dependencies
appears and no longer reports an error]
Final effect:
Finally, it is solved.
Read More:
- IDEA Maven Fail to Download Dependencies Error: ERROR – #org.jetbrains.idea.maven – Cannot reconnect.
- IDEA Create maven project error: Error running‘[org.apache.maven.pluginsmaven-archetype-pluginRELEASE
- [Solved] IDEA Import springboot Project Error: Cannot resolve plugin org.springframework.boot:spring-boot-maven-plugin:<unknown>
- Maven (http://repo1.maven.org/maven2/): Failed to transfer file and PKIX path building failed: sun.secu
- [Solved] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.1.1:analyze-only
- [Solved] Error:Maven Resources Compiler: Maven project configuration required for module ‘XX‘ isn‘t available
- MVN compile Error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin…
- [Solved] O2oa compile error: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin
- [Solved] Idea 2021.3 Maven 3.8.1 Error: Blocked mirror for repositories
- [Solved] Idea Failed to recognize Maven and Project Error
- IDEA Create Web Project with maven Error: The desired archetype does not exista…
- [Solved] Spring Boot Package Error: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0
- [Solved] Maven Multi-Project Compile Error: The POM for xxx is invalid
- [Solved] MVN Build Project Error: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test
- [Solved] SpringBoot Pack Project: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources
- [Solved] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-cli) on
- IDEA Package Error: No valid Maven installation found.
- [Solved] Maven Publish Error: Failed to execute goal org.apache.maven.pluginsmaven-deploy-plugin2.8.2deploy
- IDEA Maven pom.xml is grayed out and strikethrough appears
- [Solved] IDEA Add maven Project Error: Error:(3,21)java: Package javax.servletdoes not exist