Solve the problem that Maven does not take effect after idea git switches multiple branches

Time:2021-3-2

Idea git branch switching method

在这里插入图片描述

Click git below to check out the branch to be developed

How to keep Maven normal after switching multiple branches

After multiple branches of idea switch back and forth, the local Maven dependency information is not updated in time. At this time, it is possible that the current branch refers to the dependency of the previous Maven library, so the Maven install operation is needed to update the local Maven library. There are two specific operations

Execute by command
There is terminal control bar under idea to input commandsmvn cleanaftermvn install -Dmaven.test.skip=true

Click on the right side of idea

在这里插入图片描述

According to the operation on the right, click clean and then install

Last step refresh
Click the rotate refresh button at the top left of the figure above to update the local Maven warehouse

After the above steps are completed, the local Maven dependency is normal

summary

Here is the article about how to solve the problem that idea git switches multiple branches and Maven doesn’t work. For more information about idea git switching branches and Maven doesn’t work, please search previous articles of developer or continue to browse the following related articles. I hope you can support developer more in the future!