Community
Participate
Working Groups
USE CASE: There is a project containing common base and utility classes that is needed to be deployed as a plug-in in an RCP application and also included within a WAR file created from a separate server project. ISSUE: If you add the common project to the server project via J2EE Module Dependencies, a META-INF directory and MANIFEST.MF file (Jar-file style) are added to the src directory of the common project. Also, a .settings directory is added with three files in it -- org.eclipse.wst.common.component file, org.eclipse.wst.common.project.facet.core.xml, and org.eclipse.jdt.core.prefs. Rob Frost told me that this causes the project to be converted to a J2EE utility project. Howver, the added manifest effectively overrides the plug-in manifest in the resultant plug-in JAR file when the common project is exported as a "deployable plugin or fragment". I proved this by renaming the added MANIFEST.MF to MANIFEST.MF2 and both files are output to the plug-in JAR file. WORKAROUND: The workaround is to rename the MANIFEST.MF added by the J2EE Module Dependencies to MANIFEST.MF2 (or even to delete it), which allows the plug-in manifest to be correctly exported but does not cause any problems when the project is exported as a simple JAR file within the WAR file of the server project. RECOMMENDATION: Do not add a MANIFEST.MF file when the common project is made a dependency. The added MANIFEST.MF file does not appear to be necessary. THe entries in the .settings directory ought to be enough to mark the project with a J2EE utilty facet without removing its plug-in nature. It should be possible for the manifest to be created automatically by the JDK JAr utility.
Related to bug 141056.