Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to create maven project: '.../pom.xml' already exists in VFS (IntelliJ)

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

like image 500
Oliver Kocsis Avatar asked Jun 08 '17 19:06

Oliver Kocsis


2 Answers

See Cleaning System Cache page.

  1. Open any project in IntelliJ IDEA
  2. Select "File > Invalidate Caches / Restart ..."
  3. 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.

like image 101
Oliver Kocsis Avatar answered Nov 02 '22 14:11

Oliver Kocsis


@Oliver Kocsis note that when you're creating a new maven module, one of the wizard's screen is the below:

IntelliJ module wizard

As shown, the wizard fill the module path like C:\PersonalProjects\cabrunco-repo instead of C:\PersonalProjects\cabrunco-repo\pets.

So, you just need to add \yourModuleName to Content root.

like image 28
Mauricio Leoncio Dos Santos Avatar answered Nov 02 '22 13:11

Mauricio Leoncio Dos Santos