[119250] use deploy name for publish
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualArchiveComponent.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualArchiveComponent.java
index 5bf817e..258bbca 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualArchiveComponent.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualArchiveComponent.java
@@ -73,6 +73,10 @@
 	public String getName() {
 		return this.archiveType + IPath.SEPARATOR + this.archivePath.toString();
 	}
+	
+	public String getDeployedName() {
+		return getName();
+	}
 
 	public void setComponentTypeId(String aComponentTypeId) {
 		return;
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java
index a26d57b..9987334 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/resources/VirtualComponent.java
@@ -60,6 +60,25 @@
 		return getProject().getName();
 	}
 	
+	public String getDeployedName() {
+		StructureEdit core = null;
+		IProject project = getProject();
+		try {
+			if (project != null && getName() != null) {
+				core = StructureEdit.getStructureEditForRead(project);
+				if(core != null && core.getComponent() != null){
+					WorkbenchComponent component = core.getComponent();
+					if (component.getName()!=null && component.getName().length()>0)
+						return component.getName();
+				}
+			}
+		} finally {
+			if(core != null)
+				core.dispose();
+		}
+		return getProject().getName();
+	}
+	
 	public boolean exists() { 
 		StructureEdit core = null;
 		IProject project = getProject();
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualComponent.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualComponent.java
index 6adb71d..d07c71f 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualComponent.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/resources/IVirtualComponent.java
@@ -43,6 +43,11 @@
 	 * @return The name of the component.
 	 */
 	String getName();
+	
+	/**
+	 * @return The deployed name of the component.
+	 */
+	String getDeployedName();
 
 	/**
 	 * The componentTypeId is used to understand how this component should be edited and deployed.