| Summary: | Export of Java EE projects ignore removed source directories in Deployment Assembly | ||
|---|---|---|---|
| Product: | [WebTools] WTP Java EE Tools | Reporter: | Philippe <guinotphil> |
| Component: | jst.j2ee | Assignee: | Roberto Sanchez Herrera <shr31223> |
| Status: | ASSIGNED --- | QA Contact: | Chuck Bridgham <cbridgha> |
| Severity: | normal | ||
| Priority: | P3 | CC: | bubi, ccc, guinotphil, ptm097, shr31223 |
| Version: | unspecified | Keywords: | helpwanted |
| Target Milestone: | 3.7.1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Philippe
I can reproduce the same behavior with a Dynamic Web project. It looks like a common problem for all types of Java EE projects. Moving to Java EE Tools. When you export a Java EE module (EJB, web, etc), org.eclipse.jst.common.internal.modulecore.AddMappedOutputFoldersParticipant is called. AddMappedOutputFoldersParticipant searches for all the source folders in the deployment assembly page, and for each source folder, finds the corresponding output folder, and adds the output folder (with all its contents, including all the .class files) to the list of IFlatResource resources to include in the resulting archive. In the scenario described in this defect, both source folders (ejbModule and test) are using the same output folder, and only ejbModule is in the Deployment assembly. So, when AddMappedOutputFoldersParticipant finds ejbModule, it adds its output folder and all its contents (including the .class files originated from compiling the source files in test source folder). If you set the output folder for the test source folder to a different folder, then the .class files corresponding to the java files in test source folder are not included in the resulting archive. We could try to filter the .class files when they are added by AddMappedOutputFoldersParticipant, and add only the files corresponding to source files in a source folder in deployment assembly, but this could be tricky, and possibly impact performance. This needs to be discussed, but in the mean time I'm targeting to 3.7 *** Bug 402887 has been marked as a duplicate of this bug. *** *** Bug 459907 has been marked as a duplicate of this bug. *** Too late for 3.7. Moving to 3.7.1, and adding the helpwanted keyword, in case somebody is interested in providing a patch. |