Thanks for the responce Stephan.

I modified the file but get the same error?  Here is the source if you don't mind 
looking at it ;P

<!-- simple xml buildfile  --> 
<!-- generated by Together --> 

<project name="EUCLID" default="compile"> 
         <!-- set global properties for this build -->
         <property name="src" value="R:\P7064\oshea\Repository Software"/> 
         <property name="dest" value="R:\P7064\oshea\Repository Software\out\"/> 
         <property name="dist" value="R:\P7064\oshea\Repository Software\out\_dist"/> 
         <property name="classpath" value="R:\P7064\oshea\Repository 
Software\out\;C:\programs\xerces-1_4_4\xerces.jar;C:\programs\jaxp-1.1\jaxp.jar;C:\programs\jaxp-1.1\xalan.jar;;C:\Together5.5\lib\junit\junit.jar;C:\Together5.5\lib\junitx\junitx.jar;C:\Together5.5\lib\javax.jar"/>
 
        <target name="init"> 
                <!-- Create the build directory structure used by compile -->
                <mkdir dir="${dest}"/>
        </target>
        <target name="compile" depends="init"> 
                <!-- Compile the java code from ${src} into ${dest} -->
                <javac srcdir="${src}" destdir="${dest}" debug="on">
                        <classpath path="${classpath}"/>
                </javac>
        </target>
        <target name="clean"> 
                <!-- Delete the ${dest} and ${dist} directory tree -->
                <delete dir="${dest}"/>
                <delete dir="${dist}"/>
        </target>
         <target name="make_jar" depends="compile"> 
                <!-- Create the distribution directory -->
                <mkdir dir="${dist}"/>
                <!-- Put everything in ${dist} into the EUCLID.jar file -->
                <jar jarfile="${dist}/EUCLID.jar" basedir="${dest}" 
excludes="EUCLID.jar"/>
        </target>
        <target name="rebuild" depends="clean, compile"/> 
</project>

Cheers,
Ric

-----Original Message-----
From: Stefan Bodewig [mailto:[EMAIL PROTECTED]]
Sent: 14 March 2002 15:59
To: [EMAIL PROTECTED]
Subject: Re: jar task in jakarta-ant-1.4.1


On Thu, 14 Mar 2002, Richard OShea <[EMAIL PROTECTED]>
wrote:

> When I call ant make_jar (using v1.4.1) it fails stating "a zip file
> cannot contain itself" yet there are no other zip files in the
> directory structure.

You are trying to zip up a directory and put the resulting archive in
that directory as well.  As a result, the archive itself is among the
list of files that should be added to the archive - and Ant complains.

Exclude the archive from your jar, something like

<jar jarfile="my.jar" basedir="." excludes="my.jar" />

and you won't get that warning.

> When I use the version of Ant bundled by Together Control Center I
> get no such error?

Which means that TCC bundles a very old version of Ant, drop that
immediately.  The test has been added in Ant 1.3.

Stefan

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


*******************************************************************************
This email and any files transmitted with it are intended solely for the use of
the individual or entity to whom they are addressed and may not be divulged to
any third party without the express permission of the originator.  Any views
expressed in this message are those of the individual sender, except where the
sender specifically states them to be the views of Thales Research Ltd.

Following the acquisition of Racal Electronics plc by Thomson-CSF, please note
that our new name is Thales Research Ltd.  For more information regarding the
Thales Group (formerly Thomson-CSF) please see our website www.Thalesgroup.com
*******************************************************************************

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to