User: mnf999 Date: 02/02/01 10:27:21 Modified: src/main/org/jboss/deployment MainDeployer.java Log: Fix for the sub directory deployments, if a jar in a sub then it gets deployed at flat level. This fixes a bug in the war deployment Revision Changes Path 1.5 +8 -3 jboss/src/main/org/jboss/deployment/MainDeployer.java Index: MainDeployer.java =================================================================== RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/deployment/MainDeployer.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- MainDeployer.java 2002/02/01 16:32:20 1.4 +++ MainDeployer.java 2002/02/01 18:27:21 1.5 @@ -42,7 +42,7 @@ * Takes a series of URL to watch, detects changes and calls the appropriate Deployers * * @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a> -* @version $Revision: 1.4 $ +* @version $Revision: 1.5 $ * * */ @@ -386,7 +386,6 @@ } catch (DeploymentException e) { - log.error("Deployment failed: "+ deployment.url,e); deployment.status="Deployment FAILED reason: "+e.getMessage(); @@ -557,6 +556,11 @@ JarEntry entry = (JarEntry)e.nextElement(); String name = entry.getName(); + // Make sure the name is flat no directory structure in subs name + // example war's WEBINF/lib/myjar.jar appears as myjar.jar in the tmp directory + if (name.lastIndexOf("/") != -1) + name = name.substring(name.lastIndexOf("/")); + // Everything that is not // a- an XML file // b- a class in a normal directory structure @@ -573,6 +577,7 @@ { File localCopyDir = new File(System.getProperty("jboss.system.home")+File.separator+"tmp"+File.separator+"deploy"); + // We use the name of the entry as the name of the file under deploy // (marcf note: I don't think we need the getNextID, not important) File outFile = new File(localCopyDir, name); @@ -595,7 +600,7 @@ catch (DeploymentException e3) { throw e3;} //just throw catch (Exception e2) { - log.error("Error in subDeployment with name "+name); + log.error("Error in subDeployment with name "+name, e2); throw new DeploymentException("Could not deploy sub deployment "+name+" of deployment "+di.url); }
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
