I've checked for bugzilla and mail-archive.com for reports of this issue
with no avail. 

Basically, there tar task seems defunct when I run the following target
definition under these two ant distros:

Among other things, it overrides the fixcrlf applied in the previous step of
this target, which results in .sh scripts
with DOS line terminators. :(

Unfortunately, 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/run-crystal.sh > bin/run-crystal.sh.tmp
mv bin/run-crystal.sh.tmp bin/run-crystal.sh





----------------------------------------------------------------
  <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

Reply via email to