The clean project imported by idea reported an error - No valid Maven installation found.

The clean project imported by idea reported an error - No valid Maven installation found.

Preface

After handing over the work content to a colleague, I found an error in clean when I opened his code to view it. So I started to discover the content of Baidu error reports, and recorded them here after solving them.

Specific error content

No valid Maven installation found. Either set the home directory in the configuration dialog or set the M2_HOME environment variable on your system.

Solution

  1. First check if the maven path is correct
  2. Check the .idea/workspace.xml tag in the project directory, change its path to the maven path of your computer, and then restart Idea or reload from disk

Guess you like

Origin blog.csdn.net/weixin_55549435/article/details/128723492