Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when I tried create new maven module in IntellijIDE 15

I tried add new module to project in IntellijIDE 15 and I have error

Failed to create a Maven project 'C:/gitProjects/mayProj/pom.xml' already exists in VFS 

And in my project create file moduleName.iml but in IDE not shows module folder and in project structure this module is shows.

like image 865
user5620472 Avatar asked Mar 03 '16 05:03

user5620472


People also ask

Why Maven is not showing in IntelliJ?

In the file menu select settings -> plugins. search for maven, select maven, select enable. Restart intellij. Once restarted you will now have the option to start new maven project and maven functionality will be accessible in all your previous projects.


1 Answers

When adding the module to an existing module that already has a POM, it is necessary to manually specify that the new module will be in a different directory. This is counter-intuitive, but I think the "Add Module" dialog was not built with maven specifically in mind.

What this means is when you are adding a module to an existing module with a POM, for example, an aggregator project, on the second page of the dialog, you need to manually copy and paste the "Module Name" onto the end of the "Content root" and "Module file locations".

enter image description here

like image 164
jordanpg Avatar answered Oct 11 '22 09:10

jordanpg