### Eclipse Workspace Patch 1.0
#P org.jboss.ide.eclipse.as.wtp.core
Index: src/org/jboss/ide/eclipse/as/wtp/core/util/ServerModelUtilities.java
===================================================================
--- src/org/jboss/ide/eclipse/as/wtp/core/util/ServerModelUtilities.java	(revision 22049)
+++ src/org/jboss/ide/eclipse/as/wtp/core/util/ServerModelUtilities.java	(working copy)
@@ -15,6 +15,7 @@
 
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.jst.server.core.IEnterpriseApplication;
+import org.eclipse.jst.server.core.IJ2EEModule;
 import org.eclipse.wst.server.core.IModule;
 import org.eclipse.wst.server.core.IServer;
 import org.jboss.ide.eclipse.as.wtp.core.modules.IJBTModule;
@@ -47,17 +48,31 @@
 	}
 	
 	public static IModule[] getChildModules(IModule[] module) {
-		int last = module.length-1;
-		if (module[last] != null && module[last].getModuleType() != null) {
-			IEnterpriseApplication enterpriseApplication = (IEnterpriseApplication) module[last]
-			                           .loadAdapter(IEnterpriseApplication.class, null);
-			if( enterpriseApplication != null )
-				return enterpriseApplication.getModules() == null ? new IModule[]{} : enterpriseApplication.getModules();
-			
-			IJBTModule jbtMod = (IJBTModule)module[last].loadAdapter(IJBTModule.class, null);
-			if( jbtMod != null )
-				return jbtMod.getModules();
-		}
+		int last = module.length -1;
+		if( module[last] != null && module[last].getModuleType() != null)
+			return getChildModules(module[last]);
+		return new IModule[0];
+	}
+	
+	public static IModule[] getChildModules(IModule module) {
+		IEnterpriseApplication enterpriseApplication = (IEnterpriseApplication) 
+		                           module.loadAdapter(IEnterpriseApplication.class, null);
+		if( enterpriseApplication != null )
+			return enterpriseApplication.getModules() == null ? new IModule[]{} : enterpriseApplication.getModules();
+		
+		IJBTModule jbtMod = (IJBTModule)module.loadAdapter(IJBTModule.class, null);
+		if( jbtMod != null )
+			return jbtMod.getModules();
 		return new IModule[0];
 	}
+	
+	public static boolean isBinaryModule(IModule module) {
+		IJ2EEModule jee = (IJ2EEModule) module.loadAdapter(IJ2EEModule.class, null);
+		if( jee != null )
+			return jee.isBinary();
+		IJBTModule jbtMod = (IJBTModule)module.loadAdapter(IJBTModule.class, null);
+		if( jbtMod != null )
+			return jbtMod.isBinary();
+		return false;
+	}
 }
#P org.jboss.ide.eclipse.archives.webtools
Index: src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java
===================================================================
--- src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java	(revision 22049)
+++ src/org/jboss/ide/eclipse/archives/webtools/modules/LocalZippedPublisherUtil.java	(working copy)
@@ -30,6 +30,7 @@
 import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
 import org.jboss.ide.eclipse.as.core.util.FileUtil;
 import org.jboss.ide.eclipse.as.core.util.FileUtil.IFileUtilListener;
+import org.jboss.ide.eclipse.as.wtp.core.util.ServerModelUtilities;
 
 import de.schlichtherle.io.ArchiveDetector;
 
@@ -174,6 +175,21 @@
 		return (IStatus[]) status.toArray(new IStatus[status.size()]);
 	}
 	
+	protected IStatus[] fullBinaryPublish(IServer server, String deployRoot, IModule[] parent, IModule last) {
+		ArrayList<IStatus> results = new ArrayList<IStatus>();
+		try {
+			IPath path = getOutputFilePath(combine(parent, last));
+			path = path.removeLastSegments(1);
+			de.schlichtherle.io.File root = TrueZipUtil.getFile(path, TrueZipUtil.getJarArchiveDetector());
+			IModuleResource[] resources = getResources(last);
+			results.addAll(Arrays.asList(copy(root, resources)));
+			TrueZipUtil.umount();
+			return (IStatus[]) results.toArray(new IStatus[results.size()]);
+		} catch( CoreException ce) {
+			results.add(generateCoreExceptionStatus(ce));
+			return (IStatus[]) results.toArray(new IStatus[results.size()]);
+		}
+	}
 	protected IStatus[] fullPublish(IServer server, String deployRoot, IModule[] module) {
 		ArrayList<IStatus> results = new ArrayList<IStatus>();
 		try {
@@ -187,8 +203,12 @@
 			results.addAll(Arrays.asList(copy(root, resources)));
 			
 			IModule[] children = server.getChildModules(module, new NullProgressMonitor());
-			for( int i = 0; i < children.length; i++ ) 
-				results.addAll(Arrays.asList(fullPublish(server, deployRoot, combine(module, children[i]))));
+			for( int i = 0; i < children.length; i++ ) {
+				if( ServerModelUtilities.isBinaryModule(children[i]))
+					results.addAll(Arrays.asList(fullBinaryPublish(server, deployRoot, module, children[i])));
+				else
+					results.addAll(Arrays.asList(fullPublish(server, deployRoot, combine(module, children[i]))));
+			}
 			TrueZipUtil.umount();
 			return (IStatus[]) results.toArray(new IStatus[results.size()]);
 		} catch( CoreException ce) {
#P org.jboss.ide.eclipse.as.core
Index: jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java
===================================================================
--- jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java	(revision 22049)
+++ jbosscore/org/jboss/ide/eclipse/as/core/server/xpl/PublishCopyUtil.java	(working copy)
@@ -540,8 +540,13 @@
 		List status = new ArrayList(2);
 		if (resource instanceof IModuleFolder) {
 			IModuleFolder folder = (IModuleFolder) resource;
-			IStatus[] stat = publishFull(folder.members(), path, monitor);
-			addArrayToList(status, stat);
+			IModuleResource[] children = folder.members();
+			if( children.length == 0 )
+				handler.makeDirectoryIfRequired(folder.getModuleRelativePath().append(folder.getName()), monitor);		
+			else {
+				IStatus[] stat = publishFull(children, path, monitor);
+				addArrayToList(status, stat);
+			}
 		} else {
 			IModuleFile mf = (IModuleFile) resource;
 			path = path.append(mf.getModuleRelativePath()).append(name);
Index: jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
===================================================================
--- jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java	(revision 22049)
+++ jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java	(working copy)
@@ -30,6 +30,7 @@
 import org.jboss.ide.eclipse.as.core.util.ModuleUtil;
 import org.jboss.ide.eclipse.as.core.util.ServerUtil;
 import org.jboss.ide.eclipse.as.wtp.core.modules.IJBTModule;
+import org.jboss.ide.eclipse.as.wtp.core.util.ServerModelUtilities;
 
 public class DeployableServer extends ServerDelegate implements IDeployableServer {
 
@@ -62,11 +63,6 @@
 		return Status.OK_STATUS;
 	}
 
-	public IModule[] getChildModules(IModule[] module) {
-		IModule[] children = ModuleUtil.getChildModules(module);
-		return children;
-	}
-
     public IModule[] getRootModules(IModule module) throws CoreException {
         IStatus status = canModifyModules(new IModule[] { module }, null);
         if (status != null && !status.isOK())
@@ -77,6 +73,9 @@
         return new IModule[] { module };
     }
 
+	public IModule[] getChildModules(IModule[] module) {
+		return ServerModelUtilities.getChildModules(module);
+	}
 
 	private IModule[] doGetParentModules(IModule module) {
 		// get all supported modules
@@ -86,20 +85,10 @@
 		ArrayList<IModule> list = new ArrayList<IModule>();
 		
 		for( int i = 0; i < supported.length; i++ ) {
-			IEnterpriseApplication jeeMod = (IEnterpriseApplication)supported[i].loadAdapter(IEnterpriseApplication.class,null);
-			IJBTModule jbtMod = (IJBTModule)supported[i].loadAdapter(IJBTModule.class, null);
-			if( jeeMod != null ) {
-				IModule[] childs = jeeMod.getModules();
-				for (int j = 0; j < childs.length; j++) {
-					if(childs[j].equals(module))
-						list.add(supported[i]);
-				}
-			} else if( jbtMod != null ) {
-				IModule[] childs = jbtMod.getModules();
-				for (int j = 0; j < childs.length; j++) {
-					if(childs[j].equals(module))
-						list.add(supported[i]);
-				}
+			IModule[] childs = ServerModelUtilities.getChildModules(supported[i]);
+			for (int j = 0; j < childs.length; j++) {
+				if(childs[j].equals(module))
+					list.add(supported[i]);
 			}
 		}
 		return list.toArray(new IModule[list.size()]);
