[400967] deploy-name of EAR projects is ignored during deployment
diff --git a/features/org.eclipse.jst.web_core.feature.patch/buildnotes_org.eclipse.jst.web_core.feature.patch.html b/features/org.eclipse.jst.web_core.feature.patch/buildnotes_org.eclipse.jst.web_core.feature.patch.html
index 206411c..3c4b4d8 100644
--- a/features/org.eclipse.jst.web_core.feature.patch/buildnotes_org.eclipse.jst.web_core.feature.patch.html
+++ b/features/org.eclipse.jst.web_core.feature.patch/buildnotes_org.eclipse.jst.web_core.feature.patch.html
@@ -18,7 +18,10 @@
<p>Bug <a href='https://bugs.eclipse.org/404855'>404855</a>. Incorrect name for connector xml catalog entries</p>
<p>Bug <a href='https://bugs.eclipse.org/403943'>403943</a>. CategorizedProblems problem in JSP file are disappearing when the annotations processor is turned on.</p>
<p>Bug <a href='https://bugs.eclipse.org/404914'>404914</a>. Lots of log entries from org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDataModelProvider</p>
-<p>Bug <a href='https://bugs.eclipse.org/406595'>406595</a>. Disable Java EE module creation if not supported by target server runtime</p>
+<p>Bug <a href='https://bugs.eclipse.org/406595'>406595</a>. Disable Java EE module creation if not supported by target server runtime</p>
+<p>Bug <a href='https://bugs.eclipse.org/400967'>400967</a>. deploy-name of EAR projects is ignored during deployment</p>
+<p>Bug <a href='https://bugs.eclipse.org/407023'>407023</a>. When module deleted, can't tell if the module was external or not</p>
+<p>Bug <a href='https://bugs.eclipse.org/407089'>407089</a>. Server status is not set to Republish when deleting a web project, but the references to the project are not removed in the refactoring dialog</p>
</body>
</html>
\ No newline at end of file
diff --git a/features/org.eclipse.jst.web_core.feature.patch/feature.properties b/features/org.eclipse.jst.web_core.feature.patch/feature.properties
index 00e2b9d..f6edf53 100644
--- a/features/org.eclipse.jst.web_core.feature.patch/feature.properties
+++ b/features/org.eclipse.jst.web_core.feature.patch/feature.properties
@@ -33,6 +33,9 @@
Bug https://bugs.eclipse.org/403943 CategorizedProblems problem in JSP file are disappearing when the annotations processor is turned on.\n\
Bug https://bugs.eclipse.org/404914 Lots of log entries from org.eclipse.jst.j2ee.web.project.facet.WebFacetInstallDataModelProvider.\n\
Bug https://bugs.eclipse.org/406595 Disable Java EE module creation if not supported by target server runtime\n\
+Bug https://bugs.eclipse.org/400967 deploy-name of EAR projects is ignored during deployment\n\
+Bug https://bugs.eclipse.org/407023 When module deleted, can't tell if the module was external or not\n\
+Bug https://bugs.eclipse.org/407089 Server status is not set to Republish when deleting a web project, but the references to the project are not removed in the refactoring dialog\n\
\n\
\n\
# "copyright" property - text of the "Feature Update Copyright"
diff --git a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableFactory.java b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableFactory.java
index 6a03672..afdb89e 100644
--- a/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableFactory.java
+++ b/plugins/org.eclipse.jst.j2ee/j2eeplugin/org/eclipse/jst/j2ee/internal/deployables/J2EEDeployableFactory.java
@@ -37,6 +37,7 @@
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModule2;
import org.eclipse.wst.server.core.internal.Module;
import org.eclipse.wst.server.core.internal.ModuleFactory;
import org.eclipse.wst.server.core.internal.ServerPlugin;
@@ -123,7 +124,15 @@
if (canHandleProject(component.getProject())) {
String type = JavaEEProjectUtilities.getJ2EEProjectType(component.getProject());
String version = J2EEProjectUtilities.getJ2EEProjectVersion(component.getProject());
- IModule module = createModule(component.getName(), component.getName(), type, version, component.getProject());
+ Map<String, String> props = new HashMap<String, String>();
+ String componentName = component.getName();
+ String deployedName = component.getDeployedName();
+ props.put(IModule2.PROP_DEPLOY_NAME, component.getDeployedName());
+ if (componentName != null && deployedName != null && !componentName.equals(deployedName)) {
+ // Only set the display name if the deploy name and the module name are different.
+ props.put(IModule2.PROP_DISPLAY_NAME, componentName + "(" + deployedName + ")"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+ IModule module = createModule(component.getName(), component.getName(), type, version, component.getProject(), props);
FlatComponentDeployable moduleDelegate = createModuleDelegate(component.getProject(), component);
moduleDelegates.put(module, moduleDelegate);
projectModules.add(module);