demo
|-- pom.xml
|-- demo-core
| `-- pom.xml
`-- demo-ui
`-- pom.xml
|-- pom.xml
|-- demo-core
| `-- pom.xml
`-- demo-ui
`-- pom.xml
This layout leads to some problems when you want to import these projects (demo, demo-core, and demo-ui) into Eclipse. One way to solve this issue is to configure Maven for using flat project layout. Directory structure for this kind of layout will be as follows:
demo
`-- pom.xml
demo-core
`-- pom.xml
demo-ui
`-- pom.xml
`-- pom.xml
demo-core
`-- pom.xml
demo-ui
`-- pom.xml
This is what Eclipse really likes. Off course, this does not happen by itself. First, we should modify the modules element of the parent POM as follows:
<modules>
<module>../demo-core</module>
<module>../demo-ui</module>
</modules>
<module>../demo-core</module>
<module>../demo-ui</module>
</modules>
After this small change, you can develop your multiple module projects in an Eclipse environment with no problem.
No comments:
Post a Comment