最近看尝试使用idea工具开发web项目。但是因为很多项目名字为了方便就起名springweb、helloworld等。
在idea创建一个同名的项目时,即使我们删掉相应的项目(即使清空了本地文件夹目录)依旧提示
Failed to create maven project: ‘…/pom.xml’ already exists in VFS
以上为背景。
根据错误提示,我琢磨着,应该把这个VFS里面的内容清理一下,因为毕竟我已经在文件中将project删除了。但是我不知道VFS是啥
遂上stackoverflow找方法,遇到一哥们,问题如下:
When I would like to re-create a maven project with a name had been but have been deleted already, I receive the following error message:
Failed to create maven project: ‘…/pom.xml’ already exists in VFS
下面靠谱回答:
See Cleaning System Cache page.
Open any project in IntelliJ IDEA
Select “File > Invalidate Caches / Restart …”
Click on “Invalidate and Restart”
WARNING:
Cleaning out the system caches, keep in mind that:
It results in clearing the local history.
To avoid losing data, check in the changes to your version control system before invalidating caches. Causes a complete rebuild of all the projects ever run in the current version of IntelliJ IDEA.
大体的意思是让我们清除缓存。还提醒我们在清缓存之前注意版本控制问题。
删掉这个残缺不全的项目,然后 Invalidate and Restart 重新建立。OK