I'm trying to convert an old Ant project to Maven. The project has a massive code base which is packed in different wars using Ant targets. It has multiple source folders, and each war is generated using different classes of these source folder. The code base should be separated in different sub-project but at the moment this is not an option so the goal is to have multiple wars for one project.
I've tried to use maven modules, creating a parent pom and a subfolder maven-modules
in which I have one pom for each war that I need to generate, here's an example:
OldMassiveProject
│ ├── src
│ │ └── bunch.of.packages
│ ├── other_src
│ │ └── bunch.of.packages
│ ├── various_resources_folder
...
│ ├── maven_modules
│ │ ├── module_1
│ │ │ └── pom.xml
│ │ ├── module_2
│ │ │ └── pom.xml
...
│ │ ├── module_n
│ │ │ └── pom.xml
│ ├── deploy_configuration
│ │ ├── module_1
│ │ │ ├── spring_files
│ │ │ └── web.xml
│ │ ├── module_2
│ │ │ ├── spring_files
│ │ │ └── web.xml
...
│ │ ├── module_n
│ │ │ ├── spring_files
│ │ │ └── web.xml
│ └── pom.xml (parent pom)
I've managed to create the wars but my IDE (Eclipse) cannot resolve imports of the dependencies used in the modules'pom. That's because the parent pom doesn't specify those dependencies so they are not added to the project's classpath. My question is: Is there a way to import modules' pom dependencies in the projectclass path?