Luke Buthman
Luke Buthman

Reputation: 111

Add Maven submodule to parent in IntelliJ

In Eclipse, I can create a Maven project with pom packaging and then add submodules with war and jar packaging to it. I am trying to do the same thing in IntelliJ and can't find a way to do it. There doesn't appear to be options for packaging and when I add the module to the parent I get:

"Failed to create a Maven project: '/././IdeaProjects/spring-mvc-cookbook/cloudstreetmarket-parent/pom.xml' already exists in VFS"

Does anyone know how to add submodules in IntelliJ and how to change their packaging? If I'm going about it the wrong way, please help provide the right way.

Upvotes: 2

Views: 10334

Answers (1)

Luke Buthman
Luke Buthman

Reputation: 111

In the Project Structure | Modules menu, you can add modules and submodules, import them, configure them, etc. The packaging should be done in the Maven pom.xml file.

Upvotes: 7

Related Questions