Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362596

Summary: Multi-module project war file does not deploy with dependencies when versions missing
Product: z_Archived Reporter: Kiren Pillay <kirenpillay1>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED NOT_ECLIPSE QA Contact:
Severity: minor    
Priority: P3 CC: igor
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Kiren Pillay CLA 2011-11-01 15:49:06 EDT
Build Identifier: Eclipse:M20110909-1335    SpringSource STS 2.8.0 Build 201110171000

We have a multi-module project with a single war file that is built up with  modules in the children project. We are deploying the war file to a vFabric Tomcat server from within the eclipse IDE. Workspace dependency resolution is enabled, and the war file appears with all the dependent modules in the server view.

However,  if the version for the dependent modules are not explicitly specified in the war's pom.xml file, the dependent modules are not included on the server view and the server complains of missing classes when starting up: the application fails.

The reason for wanting to leave out the version tag in the child pom is that we want the versioning to be defined in the dependencyManagement section of the parent module.
The system should resolve the dependent modules even if its left out of the child poms and defined in the parents pom.

Reproducible: Always

Steps to Reproduce:
1. Have a multi-module web application
2. Add the version of the child modules.
3. Deploy the application to the tomcat server, application will work, and show all the dependent modules.
4. Define the modules in the dependency management section of the parent pom.
5. Remove the versions from the servlets poms, since they defined in the parent.
6. Deploy the application from within the IDE.
7. The modules will not appear, and the applications will fail.
Comment 1 Igor Fedorenko CLA 2011-11-01 16:42:26 EDT
m2e does not directly provide war development support. I suggest you report the issue to STS developers.
Comment 2 Denis Roy CLA 2021-04-19 13:24:23 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/