Community
Participate
Working Groups
From the newsgroups: When I try to create a new plugin with the last version of Eclipse, I have some problems to build it because the build.xml reference a external zip command that does not work on my PC. I don't understand why this version of eclipse generate a build.xml that does not support the ant's internal zip and jar task. May be I do something wrong when I generate the plugIn project ? Thomas Papiernik
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.