I'd like to work on two different versions of the same multi-modules maven project under eclipse.
Unfortunately, when you import a multi-module maven project under eclipse, you can change the parent module project name yourself, to prevent conflicts, but not the child modules projects names. Child modules are imported as root projects, named after the module name. Apparently there is no way to rename them during import.
In an ideal scenario, I'd like to keep the pom as it is. Obviously I'd like to keep the same eclipse workspace...
To add modules, select eclipse-multi project in the Project Explorer and right click to open context menu. From the context menu, open Maven Project Wizard with New → Others → Maven and select Maven Module and click Next.
A multi-module project is built from an aggregator POM that manages a group of submodules. In most cases, the aggregator is located in the project's root directory and must have packaging of type pom. The submodules are regular Maven projects, and they can be built separately or through the aggregator POM.
Because modules within a multi-module build can depend on each other, it is important that the reactor sorts all the projects in a way that guarantees any project is built before it is required. The following relationships are honoured when sorting projects: a project dependency on another module in the build.
Yes, you can. You have to change the name pattern in the m2eclipse importer. All modules will have this pattern and you have a conflict-free env.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With