26

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.

4 Answers 4

58

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

1
0

When you create the module manually in the context root in module file location, you must define the module name.

eg. C:\Users\Desktop\Desktop\release\1.2.1-SNAPSHOT\payment\xxx-xxx-xxx

0

The problem is Intellij will be failing to create module folder for your module, so you need to specify your content-root path and module-file-location.

just copy and paste your module name to content-root and module-file-location

module-name = learn-example
content-root = xxxx/zubs/learn-example
module-file-location = xxxx/zubs/learn-example
-1

Error when I tried create new maven module in IntellijIDE on MacBook

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.