maven - IntelliJ Project Structure full of "... and modules" and duplicates -
i have following folder structure:
main - server -- server-module-1 --- --- b --- c -- server-module-2 --- d --- e --- f - client -- modules --- client-module-1 --- client-module-2 --- client-module-3 - war-module
maven structure similar - main pom.xml:
<modules> <module>server</module> <module>client</module> <module>war-module</module> </modules>
the problem begins if move 1 module separate profile since don't need war-module (on jenkins).
<modules> <module>server</module> <module>client</module> </modules> <profiles> <profile> <id>createmodule</id> <modules> <module>war-module</module> </modules> </profile> </profiles>
after change, intellij project structure looks this:
main , modules - client , modules -- client-modules , modules --- client-module-1 --- client-module-2 --- client-module-3 --- modules ---- client-module-1 ---- client-module-2 ---- client-module-3 -- client --- modules ---- client-module-1 ---- client-module-2 ---- client-module-3 - server , modules -- server-module-1 , modules --- --- b --- c -- server-module-2 , modules --- d --- e --- f -- server --- server-module-1 ---- ---- b ---- c --- server-module-2 ---- d ---- e ---- f - main -- client --- modules --- client-module-1 --- client-module-2 --- client-module-3 -- server --- server-module-1 ---- ---- b ---- c --- server-module-2 ---- d ---- e ---- f -- war-module
if manually remove "war-module" via maven - "remove project", goes normal. however, since many people use project not want happen time. intellij seems decide @ random if detects war-module maven module or not.
any idea how can stop intellij creating "and modules" structure? produces number of weird side effects opening folders if expand in branch , uncomfortable use.
the solutions seems disabling setting when creating/importing project in intellij:
create module groups multi-module projects
disabling setting later not help.
if not want reimport, can manually fix structure:
- right-click on topmost module (e.g. "main" - not "main , modules")
- select "move module group" - "outside group"
- the project should shown before
Comments
Post a Comment