Summary: | External Zip program is called by build.xml even though the program is not available | ||
---|---|---|---|
Product: | [Eclipse Project] PDE | Reporter: | Rodrigo Peretti <rodrigo> |
Component: | Build | Assignee: | DJ Houghton <dj.houghton> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P1 | CC: | cagatayk, Edwin.Fine, t.papiernik |
Version: | 2.0 | ||
Target Milestone: | 2.0 M4 | ||
Hardware: | PC | ||
OS: | All | ||
Whiteboard: |
Description
Rodrigo Peretti
2001-11-12 11:02:23 EST
I am having the same problem. Other Ant scripts seem to use a command <zip ..>, while this one is using <exec dir="${basedir}/_temp___" executable="zip"> <arg line="-r ../${component}${stamp}.jar ."/> </exec> It was added in order to solve a problem in our build process where the zip task from Ant was not preserving files' and folders' permissions. We should address this problem as soon as we migrate to Ant 1.4.1. Fixed and released into HEAD. The default behaviour is to use Ant tasks: Zip and Jar. In order to get the old behaviour (external zip command), it is necessary to set the property useExternalZip to something like "true". E.g.: -DuseExternalZip=true or <property name="useExternalZip" value="true"/> The user should be able to specify the external zip program. It should not be hardcoded in Eclipse. Reopening. From an EC post: Besides the external zip problem, the user is facing problems with spaces on a path. We should consider it when using external programs. ---------------------------------- <...> However, I have 2 problems: 1. You can't launch if the path name has a space in it. I get: java.io.IOException : CreateProcess: c:\Program" "Files\Java\....... 2. I can't seem to build the jar. I get: Execute failed: java.io.IOException: CreateProcess zip -r c:\EclipseWorkspace\com.company.myplugin/myplugin.jar . error=2 What catches my eye is forward slash. I also notice the program name of "zip". I have a zip.dll in every JDK installed on my machine but that is all. I made sure they were in my path as well but no dice. It should be fixed for fragments as well. Here's the final story. There are 4 entries in the build.properties that can be used in this case: jar.external, zip.external, zip.program and zip.argument. If you want to use an external program instead of the default Ant task for both jar and zip generation, set the following properties: jar.external = true zip.external = true In order to set the external program (will be the same for both zip and jar tasks), use the following properties as examples: zip.program = c:\utils\zip.exe zip.argument = -r ${zip.file} . Note that ${zip.file} is a variable that indicates where in the command line the zip file has to be. It was added in order to be more flexible when dealing with different zip programs. Fixed. |