'Copy module to another module maven multi-modules
I'm trying to copy a sub-module to another module without any errors while running the application
here is my structure:
+ -- MyMainProject
+ -- application
| ` -- pom.xml
+ -- domain
| ` -- pom.xml
+ -- bootloader
| `src/main/java
| ` -- pom.xml
+ -- infrastructure <- infrastructure module (has 3 modules)
+ -- infrastructure 1
| ` -- pom.xml
+ -- infrastructure 2
| ` -- pom.xml
+ -- infrastructure 3 <- move this module to application module
| ` -- pom.xml
| -- pom.xml
So what I'm trying to do is to move sub-module infrastructure 3 to application module and then my application module will have infrastructure 3 as a sub-module without any errors.
I'm using intellij, any suggestion please
Solution 1:[1]
In your root pom.xml you probably have <modules/> tag, so what you need is to copy infrastructure 3 directory onto the same level with application and include infrastructure 3 into mentioned <modules/> tag.
With IDEA you can move directory with its contents with F6. After the changes are done simply press Ctrl+Shift+O to reimport maven project, so IDEA will restructure its auxiliary files and indexes.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sergey Tsypanov |
