Hi,
Subject: Compiling & doing jar
Operating System:Windows NT
Iam using
ant v 1.4.1 & I have done compilation succesfully but when I do
the jar of the compiled source I get the following Error
ant -buildfile compilejar.xml
Buildfile: compilejar.xml
compile:
jar:
BUILD FAILED
C:\Ant\jakarta-ant-1.4.1\bin\compilejar.xml:25: The <jar> task doesn't
support the "destfile" attribut
Total time: 1 second
Note: My classpath & ANT_HOME dont make any issue since Iam able to compile
& do other tasks
with the ant
All the Directory metioned in the xml file exsists
<?xml version="1.0" encoding="UTF-8"?>
<project name="Ant Demo" default="jar" basedir=".">
<!--Define Global properties. -->
<property environment="env"/>
<property name="buildDir" value="classes"/>
<property name="srcDir" value="src"/>
<property name="xalan" value="XML/xalan/xalan.jar"/>
<property name="xerces" value="XML/xalan/xerces.jar"/>
<property name="junit"
value="JUnit/junit3.7/junit.jar"/>
<path id="classpath">
<pathelement path="${buildDir}"/>
<pathelement path="${junit}"/>
<pathelement path="${xerces}"/>
<pathelement path="${xalan}"/>
</path>
<target name="compile" description="compiles source files">
<javac srcdir="${srcDir}" destdir="${buildDir}"
classpath="classpath"/>
</target>
<target name="jar" depends="compile"
description="To jar the Compiled Source" >
<jar basedir="${buildDir}"
destfile="${srcDir}/lib/demo.jar"/>
</target>
</project>