Ooops.. I sent before I was done typing my message :)
Ignore the first, and I'll fill in the blanks on this one:
-----Original Message-----
From: Cook, Levi
Sent: Friday, June 29, 2001 3:14 PM
To: '[EMAIL PROTECTED]'
Subject: tar task blues
I've checked for bugzilla and mail-archive.com for reports of this issue
with no avail.
Basically, the tar task seems defunct when I run the following target
definition under these two ant distros:
C:>ant -version
Ant version 1.3 compiled on March 2 2001
C:>ant -version
Ant version 1.4alpha compiled on June 27 2001
Among other things, it overrides the fixcrlf applied in the previous step of
this target, which results in .sh scripts with DOS line terminators. :( Can
anyone confirm this behavior? or suggest an ant based fix?
This results in our .sh scripts containing DOS line terminators that need to
be touched up before running them on Unix. I typically fix this by running
the following
commands on the shell script you need to repair:
tr -d '\r' < bin/--.sh > bin/--.sh.tmp
mv bin/--.sh.tmp bin/--.sh
Tarfilesets also appear to be quite quirky, but I'll explore that issue on
another thread.
Regards,
Levi Cook
----------------------------------------------------------------
<target name="make-batch-zip"
depends="init,jar-core-bin,jar-batch-bin">
<property name="tar.tmp.dir" value="${dest.dir}/tar-tmp-dir"/>
<mkdir dir="${tar.tmp.dir}"/>
<mkdir dir="${tar.tmp.dir}/bin"/>
<copy todir="${tar.tmp.dir}/lib">
<fileset dir="${lib.dir}">
<exclude name="**/datetime.jar"/>
<exclude name="**/servlet2.2.jar"/>
<exclude name="**/struts.jar"/>
</fileset>
<fileset dir="${dest.dir}">
<include name="${ant.project.name}-core-bin.jar"/>
<include name="${ant.project.name}-batch-bin.jar"/>
</fileset>
</copy>
<copy todir="${tar.tmp.dir}/classes">
<fileset dir="${src.dir}">
<include name="**/*.properties"/>
</fileset>
</copy>
<fixcrlf srcdir="${bin.dir}"
destdir="${tar.tmp.dir}/bin"
cr="remove" eof="remove"
/>
<tar tarfile="${dest.dir}/${ant.project.name}-batch.tar"
basedir="${tar.tmp.dir}" excludes="**">
<tarfileset dir="${tar.tmp.dir}">
<include name="**/lib/**"/>
<include name="**/classes/**"/>
</tarfileset>
<tarfileset dir="${tar.tmp.dir}" mode="755">
<include name="**/bin/**"/>
</tarfileset>
</tar>
<delete dir="${tar.tmp.dir}"/>
</target>
----------------------------------------------------------------
Levi Cook
Consultant
Greenbrier & Russel, Inc.
8383 Greenway Blvd., Suite 200
Middleton, WI 53562
email: [EMAIL PROTECTED]
web : www.gr.com