Saturday, July 12, 2008

Netbeans RCP shell scripts permissions

Sometimes when you are building an RCP application, You need to include some shell scripts. What i have found that if you are using Linux, the build zip command drops the executable permission off the scripts. Here is a simple way to fix that. In the Suites build.xml file override the build-zip command with this.

<target name="build-zip" depends="build,build-launchers" description="Builds a ZIP distribution of the suite, launchers, and selected modules from the platform.">
<mkdir dir="${dist.dir}"/>
<zip destfile="${dist.dir}/${}.zip">
<zipfileset dir="${build.launcher.dir}/bin/" filemode="755" prefix="${}/bin"/>
<zipfileset dir="${build.launcher.dir}/etc/" prefix="${}/etc"/>
<zipfileset dir="${netbeans.dest.dir}" filemode="755" prefix="${}">
<include name="**/lib/nbexec*"/>
<zipfileset dir="${netbeans.dest.dir}" prefix="${}">
<filename name="**/lib/nbexec*"/>
<selector refid="zip.platform.included.files"/>
<!-- Yes, the doubled is a bit ugly, but better than the alternative; cf. #66441: -->
<!-- added filemode to add executable permissions in the zip file -->
<zipfileset dir="${cluster}" prefix="${}/${}" filemode="755">
<exclude name="config/Modules/*.xml_hidden"/>

1 comment:

branajam said...

My name is James Branam and I'm the NetBeans Community Docs Manager. Your blog entry would make a fantastic Tips & Tricks entry for our Community Docs wiki ( Would you be willing to contribute it? If you need any help or have any questions, please contact me at I look forward to hearing from you.