Community
Participate
Working Groups
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091105 Fedora/3.5.5-1.fc12 Firefox/3.5.5 Build Identifier: Build id: M20090917-0800 We store some WSDL and XSD files in subfolders of the process, but the "Publish to the server" button does not preserve the directory structure. Reproducible: Always Steps to Reproduce: 1. Create sub-folders in the process folder 2. Click "Publish to the server" 3. All the files in the sub-folder are deployed directly into the process folder
Created attachment 153410 [details] Patch to preserve the folder structure
Comment on attachment 153410 [details] Patch to preserve the folder structure Index: src/org/eclipse/bpel/apache/ode/runtime/OdeBPELPublisher.java =================================================================== RCS file: /cvsroot/technology/org.eclipse.bpel/plugins/org.eclipse.bpel.apache.ode.runtime/src/org/eclipse/bpel/apache/ode/runtime/OdeBPELPublisher.java,v retrieving revision 1.2 diff -u -r1.2 OdeBPELPublisher.java --- src/org/eclipse/bpel/apache/ode/runtime/OdeBPELPublisher.java 11 Nov 2009 19:03:09 -0000 1.2 +++ src/org/eclipse/bpel/apache/ode/runtime/OdeBPELPublisher.java 1 Dec 2009 02:42:59 -0000 @@ -63,7 +63,7 @@ if (doesDeploymentDescriptorExist(files)){ - String currentDeployDir = createDeploymentDestination(module); + File currentDeployDir = new File(createDeploymentDestination(module)); for (IFile file : files) { @@ -73,7 +73,7 @@ } //remove <project>.deployed to kick the redeployment - new File(new File(currentDeployDir).getParent(), new File(currentDeployDir).getName() + ".deployed").delete(); + new File(currentDeployDir.getParent(), currentDeployDir.getName() + ".deployed").delete(); result[i] = new Status(IStatus.OK, OdePlugin.PLUGIN_ID, 1, "Deployment successful", null); @@ -203,15 +203,18 @@ return dir.delete(); } - private void copyFileToDeploymentDestination(IFile ifile, String toDeployDir) { + private void copyFileToDeploymentDestination(IFile ifile, File toDeployDir) { - String from = ifile.getFullPath().toOSString(); - String fileName = ifile.getName(); - String wspath = ifile.getWorkspace().getRoot().getLocation().toOSString(); + String toDeployDirName = toDeployDir.getName(); + String absoluteFilename = ifile.getFullPath().toPortableString(); + String fileName = absoluteFilename.substring(absoluteFilename + .lastIndexOf(toDeployDirName) + + 1 + toDeployDirName.length()); //bugzilla 284658 File srcFile = ifile.getLocation().toFile(); - File targetFile = new File(toDeployDir + System.getProperty("file.separator") + fileName); + File targetFile = new File(toDeployDir, fileName); + targetFile.getParentFile().mkdirs(); if (srcFile != null && srcFile.exists()) {
Created attachment 153411 [details] Patch to preserve the folder structure
reviewed, tested and released the fix to CVS HEAD stream
Comment on attachment 153411 [details] Patch to preserve the folder structure Updated iplog flag for v1.0 release review.