Yes.
Ammar, you need to ensure that the ANT_HOME environment variable is set to
the file system location where you extracted Ant 1.7.1.

You also need to ensure that %ANT_HOME%\bin is earlier in your PATH than any
other installations of Ant.

Greg


On Mon, Dec 1, 2008 at 11:42 AM, Mike Stewart <[EMAIL PROTECTED]> wrote:

> in the DOS window type SET and see what the environment variable ANT_HOME
> is set to, also check the PATH variable as this could be causing issues.
>
> Mike S.
>
>
>
> >>> "Ammar Khalid" <[EMAIL PROTECTED]> 01/12/2008 11:34:55 >>>
> I have written an ANT script and tested in my eclipse environment and it
> works fine from within eclipse environment. When I run the script using
> command line command:
>
> N:\tasks\ant task for juliet>ant -buildfile build.xml Buildfile:
> build.xml
>
>
> On checking the web, I saw that this maybe due to older version of ANT
> such as 1.6.2. But I have ANT 1.7.1, however when I run the command: ant
> -version, it shows the following:
>
> N:\tasks\ant task for juliet>ant -version Apache Ant version 1.6.2
> compiled on July 16 2004
>
> This is baffling me? Any ideas
>
> When I try to run the same script that works from eclipse, it shows the
> following output at command line:
>
> N:\tasks\ant task for juliet>ant -buildfile build.xml
> Buildfile: build.xml
>
> deploy_convert_tool:
>     [echo] Ant version: ${antversion}
>     [echo] Unzipping the ConvertTool.zip file
>    [unzip] Expanding: N:\tasks\ant task for juliet\ConvertTool.zip into
> N:\task
> s\ant task for juliet
>     [echo] Copying the Convert tool files
>
> BUILD FAILED
> java.lang.NoSuchMethodError:
> org.apache.tools.ant.util.FileUtils.getFileUtils()L
> org/apache/tools/ant/util/FileUtils;
>
>
>
>
> For your reference the script is at as below:
>
> <project name="JulietAntTask" default="deploy_all" basedir=".">
>        <description>
>        simple example build file
>    </description>
>        <!-- set global properties for this build -->
>        <property file="JulietAntTask.properties" />
>        <antversion property="antversion"/>
>
>
>        <target name="deploy_convert_tool" description="To copy the
> Convert tool files to destination" >
>                <echo message="Ant version: ${antversion}" />
>                <echo message="Unzipping the ConvertTool.zip file" />
>                <unzip src="${ZipFilesLoc}/${ConvertToolFileName}"
> dest="${ZipFilesLoc}"/>
>                <echo message="Copying the Convert tool files" />
>
>                <copy todir="${Dest}" overwrite="true">
>                        <fileset dir="${ZipFilesLoc}/ConvertTool">
>                                <exclude name="**/*.doc" />
>                        </fileset>
>                </copy>
>                <!--
>                <copydir src="${ZipFilesLoc}/ConvertTool" dest="${Dest}"
>                                 forceoverwrite="true"
>                                 excludes="**/*.doc"
>
>                />
>                -->
>        </target>
>
>        <target name="deploy_kbr_copy_tool" description="To copy the KBR
> Copy tool files to destination" >
>                <echo message="Unzipping the KBRCopyTool5.3.zip file" />
>                <unzip src="${ZipFilesLoc}/${KBRCopyToolFileName}"
> dest="${ZipFilesLoc}"/>
>                <echo message="Deploying the KBR Copy tool files" />
>
>                <copydir src="${ZipFilesLoc}/KBRCopyTool5.3"
> dest="${Dest}"
>                                 forceoverwrite="true"
>                                 excludes="**/*.doc,
> kbrmultiargdialogcontainer/**, ServerMethod/**"
>                />
>                <copydir
> src="${ZipFilesLoc}/KBRCopyTool5.3/kbrmultiargdialogcontainer"
> dest="${Dest}"
>                                 forceoverwrite="true"
>
>                />
>        </target>
>
>        <target name="deploy_modifygrid_projectsetup_tool"
> description="To copy the KBR Modify Grid tool files to destination" >
>                <echo message="Unzipping the ModifyGrid-ProjectSetup.zip
> file" />
>                <unzip src="${ZipFilesLoc}/${KBRModifyGridFileName}"
> dest="${ZipFilesLoc}"/>
>
>                <echo message="Copying the KBR Modify Grid tool files"
> />
>                <copydir src="${ZipFilesLoc}/KBRModifyGrid5.3"
> dest="${Dest}"
>                                 forceoverwrite="true"
>                                 excludes="**/*.txt"
>
>                />
>                <copydir src="${ZipFilesLoc}/ProjectSetup"
> dest="${Dest}"
>                                 forceoverwrite="true"
>                                 excludes="**/*.doc"
>
>                />
>
>        </target>
>
>        <target name="deploy_all" description="copy all the tools"
> depends="deploy_convert_tool, deploy_kbr_copy_tool,
> deploy_modifygrid_projectsetup_tool">
>        </target>
> </project>
>
> This e-mail, including any attached files, may contain confidential and
> privileged information for the sole use of the intended recipient.  Any
> review, use, distribution, or disclosure by others is strictly prohibited.
>  If you are not the intended recipient (or authorized to receive information
> for the intended recipient), please contact the sender by reply e-mail and
> delete all copies of this message.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to