Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362596 - Multi-module project war file does not deploy with dependencies when versions missing
Summary: Multi-module project war file does not deploy with dependencies when versions...
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-01 15:49 EDT by Kiren Pillay CLA
Modified: 2021-04-19 13:24 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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/