Can IDEA import multiple maven multi module builds in the same project?

Answered

I have a project I am working on with the following structure:

pom.xml (com.project:master-pom)

module1-master.xml (com.project:submodule1-pom) 

module2-master.xml (com.project:submodule2-pom)

those three .xml are in the same directory. 

If you were to build a war for submodule 1 you would call > mvn package -f module1-master.xml
and for submodule 2 you would call > mvn package -f module2-master.xml

both modules have as submodules the same set of poms.

I know InteliJ does actually import the project as a maven project but we are facing a lot of problems with workspace stability, usually these are .class not found exceptions witch are resolved by manualy deleting the /bin (/target) folder and rebuilding the module. 
Should the maven build be refactored to have a single master pom (as currently it technically has 3) or there is some other problem that is occurring here ?  

0
1 comment

Provided that Maven project is built successfully from command line, there should be no issues with properly importing it for the IDE.

Please provide more details. What exact problems with the IDE do you have? Do you see a "red" code? How do you build and run the application?

0

Please sign in to leave a comment.