You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ammar Khalid <Am...@kbr.com> on 2008/12/01 12:34:55 UTC

ANT failing from command line

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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: ANT failing from command line

Posted by Ammar Khalid <Am...@kbr.com>.
Nothing really there except for exe files. I have removed this from the
classpath and my new CLASSPATH is:

"C:\Program Files\Documentum\dctm.jar;C:\Documentum\config"

However, my ant -version still shows 1.6.2.

N:\>ant -version
Apache Ant version 1.6.2 compiled on July 16 2004

Thanks
Ammar
-----Original Message-----
From: Mike Stewart [mailto:MStewart@mgtplc.com] 
Sent: 01 December 2008 14:25
To: Ant Users List
Subject: RE: ANT failing from command line

Just a thought - you have a classpath environment variable set up  -

CLASSPATH=C:\ProgramFiles\Documentum\dctm.jar;C:\Documentum\config;C:\Pr
ogram
Files\Documentum\java\1.4.2_11\bin;C:\installations\apache-ant-1.7.1\lib
\ant.jar



Whats in those directories particularly C:\Program
Files\Documentum\java\1.4.2_11\bin?


Mike S.




>>> "Ammar Khalid" <Am...@kbr.com> 01/12/2008 13:18:19 >>>
I have checked the manifest file of my ant.jar and it shows:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 10.0-b22 (Sun Microsystems Inc.)
Main-Class: org.apache.tools.ant.Main

Name: org/apache/tools/ant/
Extension-name: org.apache.tools.ant
Specification-Title: Apache Ant
Specification-Version: 1.7.1
Specification-Vendor: Apache Software Foundation
Implementation-Title: org.apache.tools.ant
Implementation-Version: 1.7.1
Implementation-Vendor: Apache Software Foundation


I downloaded this from apache's website directly as a zip file. However
I must confess that on searching for ant.jar on my machines, I found
other ant.jar scattered around all over. However, how is it possible to
take on another ant.jar file, while the diagnostics output below clearly
says it is picking up ant.home: C:\installaions\apache-ant-1.7.1?


I also put the path to ANT_HOME\bin as the first entry in my PATH
variable. 

However it still shows the same output:

N:\>ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.6.2 compiled on July 16 2004

-------------------------------------------
 Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks     : 1.6.2
optional tasks : not available

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: C:\installations\apache-ant-1.7.1
ant-antlr.jar (5752 bytes)
ant-apache-bcel.jar (8611 bytes)
ant-apache-bsf.jar (3939 bytes)
ant-apache-log4j.jar (3056 bytes)
ant-apache-oro.jar (39627 bytes)
ant-apache-regexp.jar (3762 bytes)
ant-apache-resolver.jar (4071 bytes)
ant-commons-logging.jar (3910 bytes)
ant-commons-net.jar (47026 bytes)
ant-jai.jar (21348 bytes)
ant-javamail.jar (6998 bytes)
ant-jdepend.jar (8132 bytes)
ant-jmf.jar (6593 bytes)
ant-jsch.jar (30797 bytes)
ant-junit.jar (93518 bytes)
ant-launcher.jar (12143 bytes)
ant-netrexx.jar (9881 bytes)
ant-nodeps.jar (431580 bytes)
ant-starteam.jar (35355 bytes)
ant-stylebook.jar (2330 bytes)
ant-swing.jar (6738 bytes)
ant-testutil.jar (14941 bytes)
ant-trax.jar (6881 bytes)
ant-weblogic.jar (14205 bytes)
ant.jar (1323005 bytes)
xercesImpl.jar (1223877 bytes)
xml-apis.jar (194354 bytes)

-------------------------------------------
 Tasks availability
-------------------------------------------
importtypelib : Initialization error
image : Missing dependency javax.media.jai.PlanarImage
sshexec : Missing dependency com.jcraft.jsch.UserInfo
replaceregexp : Initialization error
test : Not Available
icontract : Not Available
scp : Missing dependency com.jcraft.jsch.UserInfo
translate : Initialization error
vajload : Not Available
WsdlToDotnet : Initialization error
jpcovmerge : Not Available
cvsversion : Not Available
ildasm : Initialization error
maudit : Not Available
antlr : Initialization error
ftp : Initialization error
jpcovreport : Not Available
xmlvalidate : Initialization error
cab : Initialization error
jdepend : Missing dependency jdepend.xmlui.JDepend
symlink : Initialization error
mmetrics : Not Available
junit : Initialization error
vajexport : Not Available
N:\>

-----Original Message-----
From: Greg Roodt [mailto:groodt@gmail.com] 
Sent: 01 December 2008 12:11
To: Ant Users List
Subject: Re: ANT failing from command line

How sure are you that you are have Ant 1.7.1? Here is my output and
there
are size differences in the jars.
U:\>ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.7.1 compiled on September 23 2008

-------------------------------------------
 Implementation Version
-------------------------------------------
core tasks     : 1.7.1
optional tasks : not available

-------------------------------------------
 ANT PROPERTIES
-------------------------------------------
ant.version: Apache Ant version 1.7.1 compiled on September 23 2008
ant.java.version: 1.5
ant.core.lib: C:\apps\apache-ant-1.7.1\lib\ant.jar
ant.home: c:\apps\apache-ant-1.7.1

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: c:\apps\apache-ant-1.7.1
ant-antlr.jar (5756 bytes)
ant-apache-bcel.jar (8615 bytes)
ant-apache-bsf.jar (3933 bytes)
ant-apache-log4j.jar (3060 bytes)
ant-apache-oro.jar (39654 bytes)
ant-apache-regexp.jar (3766 bytes)
ant-apache-resolver.jar (4075 bytes)
ant-commons-logging.jar (3914 bytes)
ant-commons-net.jar (47167 bytes)
ant-jdepend.jar (8126 bytes)
ant-jmf.jar (6597 bytes)
ant-jsch.jar (30802 bytes)
ant-junit.jar (93550 bytes)
ant-launcher.jar (12147 bytes)
ant-nodeps.jar (431047 bytes)
ant-swing.jar (6767 bytes)
ant-testutil.jar (14944 bytes)
ant-trax.jar (6885 bytes)
ant.jar (1322912 bytes)
commons-net-1.4.0.jar (180799 bytes)
oro-2.0.8.jar (65261 bytes)
xercesImpl.jar (1223877 bytes)
xml-apis.jar (194354 bytes)

I would suggest getting a clean download of Ant 1.7.1 and extracting it
at a
new location. Resetting ANT_HOME to this new location and ensuring that
ANT_HOME\bin is the first entry in your PATH. At the moment,
ANT_HOME\bin is
the last entry in your PATH and I am not sure if there could be an Ant
executable that gets picked up earlier.

Cheers
Greg



On Mon, Dec 1, 2008 at 11:56 AM, Ammar Khalid <Am...@kbr.com>
wrote:

> 1- After running the SET at DOS, as you can see ANT_HOME is set to:
> C:\installations\apache-ant-1.7.1
>
> 2- Also in the PATH env variable, you can see, the path to ant is:
> C:\installations\apache-ant-1.7.1\bin
>
> 3- I also ran ant -diagnostics and the output is below after the
output
> to SET
>
>
------------------------------------------------------------------------
> N:\tasks\ant task for juliet>SET
> ALLUSERSPROFILE=C:\Documents and Settings\All Users
> ANT_HOME=C:\installations\apache-ant-1.7.1
> APPDATA=C:\Documents and Settings\bbnt752\Application Data
> CLASSPATH=C:\Program
> Files\Documentum\dctm.jar;C:\Documentum\config;C:\Program F
> iles\Documentum\java\1.4.2_11\bin;
> C:\installations\apache-ant-1.7.1\lib\ant.jar
>
> CommonProgramFiles=C:\Program Files\Common Files
> COMPUTERNAME=KEAUK05169
> ComSpec=C:\WINNT\system32\cmd.exe
> FP_NO_HOST_CHECK=NO
> HOMEDRIVE=N:
> HOMEPATH=\
> HOMESHARE=\\LONFILE307\HOME$\bbnt752 
> JAD_HOME=C:\jadnt158
> JAVA_HOME=C:\j2sdk1.4.2_13
> LOGONSERVER=\\LONDCGC301
> NUMBER_OF_PROCESSORS=2
> OS=Windows_NT
> Path=C:\Program
> Files\Documentum\Shared;c:\Oracle\Ora920\bin;C:\Oracle\Ora817\bi
> n;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program
> Files\Business Ob
> jects\common\3.5\bin\NOTES\DATA;C:\Program Files\Business
> Objects\common\3.5\bin
> \NOTES;C:\Program Files\Windows
> Imaging\;C:\j2sdk1.4.2_13\bin;C:\jadnt158;C:\Pro
> gram Files\CollabNet Subversion Server;C:\Program
> Files\TortoiseSVN\bin;C:\insta
> llations\apache-ant-1.7.1\bin
> PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
> PROCESSOR_ARCHITECTURE=x86
> PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel
> PROCESSOR_LEVEL=15
> PROCESSOR_REVISION=0403
> ProgramFiles=C:\Program Files
> PROMPT=$P$G
> SESSIONNAME=Console
> SystemDrive=C:
> SystemRoot=C:\WINNT
> TEMP=C:\TEMP
> TMP=C:\TEMP
> TOMCAT_HOME=C:\tomcat5.0.28
>
UATDATA=C:\WINNT\system32\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE
> 77
> USERDNSDOMAIN=CORP.KBR.COM
> USERDOMAIN=HALHOUSTON
> USERNAME=bbnt752
> USERPROFILE=C:\Documents and Settings\bbnt752
> windir=C:\WINNT
>
>
------------------------------------------------------------------------
> ----
>
>
>
> N:\tasks\ant task for juliet>ant -diagnostics
> ------- Ant diagnostics report -------
> Apache Ant version 1.6.2 compiled on July 16 2004
>
> -------------------------------------------
>  Implementation Version (JDK1.2+ only)
> -------------------------------------------
> core tasks     : 1.6.2
> optional tasks : not available
>
> -------------------------------------------
>  ANT_HOME/lib jar listing
> -------------------------------------------
> ant.home: C:\installations\apache-ant-1.7.1
> ant-antlr.jar (5752 bytes)
> ant-apache-bcel.jar (8611 bytes)
> ant-apache-bsf.jar (3939 bytes)
> ant-apache-log4j.jar (3056 bytes)
> ant-apache-oro.jar (39627 bytes)
> ant-apache-regexp.jar (3762 bytes)
> ant-apache-resolver.jar (4071 bytes)
> ant-commons-logging.jar (3910 bytes)
> ant-commons-net.jar (47026 bytes)
> ant-jai.jar (21348 bytes)
> ant-javamail.jar (6998 bytes)
> ant-jdepend.jar (8132 bytes)
> ant-jmf.jar (6593 bytes)
> ant-jsch.jar (30797 bytes)
> ant-junit.jar (93518 bytes)
> ant-launcher.jar (12143 bytes)
> ant-netrexx.jar (9881 bytes)
> ant-nodeps.jar (431580 bytes)
> ant-starteam.jar (35355 bytes)
> ant-stylebook.jar (2330 bytes)
> ant-swing.jar (6738 bytes)
> ant-testutil.jar (14941 bytes)
> ant-trax.jar (6881 bytes)
> ant-weblogic.jar (14205 bytes)
> ant.jar (1323005 bytes)
> xercesImpl.jar (1223877 bytes)
> xml-apis.jar (194354 bytes)
>
> -------------------------------------------
>  Tasks availability
> -------------------------------------------
> importtypelib : Initialization error
> image : Missing dependency javax.media.jai.PlanarImage
> sshexec : Missing dependency com.jcraft.jsch.UserInfo
> replaceregexp : Initialization error
> test : Not Available
> icontract : Not Available
> scp : Missing dependency com.jcraft.jsch.UserInfo
> translate : Initialization error
> vajload : Not Available
> WsdlToDotnet : Initialization error
> jpcovmerge : Not Available
> cvsversion : Not Available
> ildasm : Initialization error
> maudit : Not Available
> antlr : Initialization error
> ftp : Initialization error
> jpcovreport : Not Available
> xmlvalidate : Initialization error
> cab : Initialization error
> jdepend : Missing dependency jdepend.xmlui.JDepend
> symlink : Initialization error
> mmetrics : Not Available
> junit : Initialization error
> vajexport : Not Available
> N:\tasks\ant task for juliet>ant -version
> Apache Ant version 1.6.2 compiled on July 16 2004
>
>
>
>
> -----Original Message-----
> From: Mike Stewart [mailto:MStewart@mgtplc.com] 
> Sent: 01 December 2008 11:42
> To: Ant Users List
> Subject: Re: ANT failing from command line
>
> 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" <Am...@kbr.com> 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: user-unsubscribe@ant.apache.org 
> For additional commands, e-mail: user-help@ant.apache.org 
>
>
> --
> 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: user-unsubscribe@ant.apache.org 
> For additional commands, e-mail: user-help@ant.apache.org 
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org 
> For additional commands, e-mail: user-help@ant.apache.org 
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org 
For additional commands, e-mail: user-help@ant.apache.org 


-- 
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: ANT failing from command line

Posted by Mike Stewart <MS...@mgtplc.com>.
Just a thought - you have a classpath environment variable set up  -

CLASSPATH=C:\ProgramFiles\Documentum\dctm.jar;C:\Documentum\config;C:\Program Files\Documentum\java\1.4.2_11\bin;C:\installations\apache-ant-1.7.1\lib\ant.jar



Whats in those directories particularly C:\Program Files\Documentum\java\1.4.2_11\bin?


Mike S.




>>> "Ammar Khalid" <Am...@kbr.com> 01/12/2008 13:18:19 >>>
I have checked the manifest file of my ant.jar and it shows:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 10.0-b22 (Sun Microsystems Inc.)
Main-Class: org.apache.tools.ant.Main

Name: org/apache/tools/ant/
Extension-name: org.apache.tools.ant
Specification-Title: Apache Ant
Specification-Version: 1.7.1
Specification-Vendor: Apache Software Foundation
Implementation-Title: org.apache.tools.ant
Implementation-Version: 1.7.1
Implementation-Vendor: Apache Software Foundation


I downloaded this from apache's website directly as a zip file. However
I must confess that on searching for ant.jar on my machines, I found
other ant.jar scattered around all over. However, how is it possible to
take on another ant.jar file, while the diagnostics output below clearly
says it is picking up ant.home: C:\installaions\apache-ant-1.7.1?


I also put the path to ANT_HOME\bin as the first entry in my PATH
variable. 

However it still shows the same output:

N:\>ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.6.2 compiled on July 16 2004

-------------------------------------------
 Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks     : 1.6.2
optional tasks : not available

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: C:\installations\apache-ant-1.7.1
ant-antlr.jar (5752 bytes)
ant-apache-bcel.jar (8611 bytes)
ant-apache-bsf.jar (3939 bytes)
ant-apache-log4j.jar (3056 bytes)
ant-apache-oro.jar (39627 bytes)
ant-apache-regexp.jar (3762 bytes)
ant-apache-resolver.jar (4071 bytes)
ant-commons-logging.jar (3910 bytes)
ant-commons-net.jar (47026 bytes)
ant-jai.jar (21348 bytes)
ant-javamail.jar (6998 bytes)
ant-jdepend.jar (8132 bytes)
ant-jmf.jar (6593 bytes)
ant-jsch.jar (30797 bytes)
ant-junit.jar (93518 bytes)
ant-launcher.jar (12143 bytes)
ant-netrexx.jar (9881 bytes)
ant-nodeps.jar (431580 bytes)
ant-starteam.jar (35355 bytes)
ant-stylebook.jar (2330 bytes)
ant-swing.jar (6738 bytes)
ant-testutil.jar (14941 bytes)
ant-trax.jar (6881 bytes)
ant-weblogic.jar (14205 bytes)
ant.jar (1323005 bytes)
xercesImpl.jar (1223877 bytes)
xml-apis.jar (194354 bytes)

-------------------------------------------
 Tasks availability
-------------------------------------------
importtypelib : Initialization error
image : Missing dependency javax.media.jai.PlanarImage
sshexec : Missing dependency com.jcraft.jsch.UserInfo
replaceregexp : Initialization error
test : Not Available
icontract : Not Available
scp : Missing dependency com.jcraft.jsch.UserInfo
translate : Initialization error
vajload : Not Available
WsdlToDotnet : Initialization error
jpcovmerge : Not Available
cvsversion : Not Available
ildasm : Initialization error
maudit : Not Available
antlr : Initialization error
ftp : Initialization error
jpcovreport : Not Available
xmlvalidate : Initialization error
cab : Initialization error
jdepend : Missing dependency jdepend.xmlui.JDepend
symlink : Initialization error
mmetrics : Not Available
junit : Initialization error
vajexport : Not Available
N:\>

-----Original Message-----
From: Greg Roodt [mailto:groodt@gmail.com] 
Sent: 01 December 2008 12:11
To: Ant Users List
Subject: Re: ANT failing from command line

How sure are you that you are have Ant 1.7.1? Here is my output and
there
are size differences in the jars.
U:\>ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.7.1 compiled on September 23 2008

-------------------------------------------
 Implementation Version
-------------------------------------------
core tasks     : 1.7.1
optional tasks : not available

-------------------------------------------
 ANT PROPERTIES
-------------------------------------------
ant.version: Apache Ant version 1.7.1 compiled on September 23 2008
ant.java.version: 1.5
ant.core.lib: C:\apps\apache-ant-1.7.1\lib\ant.jar
ant.home: c:\apps\apache-ant-1.7.1

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: c:\apps\apache-ant-1.7.1
ant-antlr.jar (5756 bytes)
ant-apache-bcel.jar (8615 bytes)
ant-apache-bsf.jar (3933 bytes)
ant-apache-log4j.jar (3060 bytes)
ant-apache-oro.jar (39654 bytes)
ant-apache-regexp.jar (3766 bytes)
ant-apache-resolver.jar (4075 bytes)
ant-commons-logging.jar (3914 bytes)
ant-commons-net.jar (47167 bytes)
ant-jdepend.jar (8126 bytes)
ant-jmf.jar (6597 bytes)
ant-jsch.jar (30802 bytes)
ant-junit.jar (93550 bytes)
ant-launcher.jar (12147 bytes)
ant-nodeps.jar (431047 bytes)
ant-swing.jar (6767 bytes)
ant-testutil.jar (14944 bytes)
ant-trax.jar (6885 bytes)
ant.jar (1322912 bytes)
commons-net-1.4.0.jar (180799 bytes)
oro-2.0.8.jar (65261 bytes)
xercesImpl.jar (1223877 bytes)
xml-apis.jar (194354 bytes)

I would suggest getting a clean download of Ant 1.7.1 and extracting it
at a
new location. Resetting ANT_HOME to this new location and ensuring that
ANT_HOME\bin is the first entry in your PATH. At the moment,
ANT_HOME\bin is
the last entry in your PATH and I am not sure if there could be an Ant
executable that gets picked up earlier.

Cheers
Greg



On Mon, Dec 1, 2008 at 11:56 AM, Ammar Khalid <Am...@kbr.com>
wrote:

> 1- After running the SET at DOS, as you can see ANT_HOME is set to:
> C:\installations\apache-ant-1.7.1
>
> 2- Also in the PATH env variable, you can see, the path to ant is:
> C:\installations\apache-ant-1.7.1\bin
>
> 3- I also ran ant -diagnostics and the output is below after the
output
> to SET
>
>
------------------------------------------------------------------------
> N:\tasks\ant task for juliet>SET
> ALLUSERSPROFILE=C:\Documents and Settings\All Users
> ANT_HOME=C:\installations\apache-ant-1.7.1
> APPDATA=C:\Documents and Settings\bbnt752\Application Data
> CLASSPATH=C:\Program
> Files\Documentum\dctm.jar;C:\Documentum\config;C:\Program F
> iles\Documentum\java\1.4.2_11\bin;
> C:\installations\apache-ant-1.7.1\lib\ant.jar
>
> CommonProgramFiles=C:\Program Files\Common Files
> COMPUTERNAME=KEAUK05169
> ComSpec=C:\WINNT\system32\cmd.exe
> FP_NO_HOST_CHECK=NO
> HOMEDRIVE=N:
> HOMEPATH=\
> HOMESHARE=\\LONFILE307\HOME$\bbnt752 
> JAD_HOME=C:\jadnt158
> JAVA_HOME=C:\j2sdk1.4.2_13
> LOGONSERVER=\\LONDCGC301
> NUMBER_OF_PROCESSORS=2
> OS=Windows_NT
> Path=C:\Program
> Files\Documentum\Shared;c:\Oracle\Ora920\bin;C:\Oracle\Ora817\bi
> n;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program
> Files\Business Ob
> jects\common\3.5\bin\NOTES\DATA;C:\Program Files\Business
> Objects\common\3.5\bin
> \NOTES;C:\Program Files\Windows
> Imaging\;C:\j2sdk1.4.2_13\bin;C:\jadnt158;C:\Pro
> gram Files\CollabNet Subversion Server;C:\Program
> Files\TortoiseSVN\bin;C:\insta
> llations\apache-ant-1.7.1\bin
> PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
> PROCESSOR_ARCHITECTURE=x86
> PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel
> PROCESSOR_LEVEL=15
> PROCESSOR_REVISION=0403
> ProgramFiles=C:\Program Files
> PROMPT=$P$G
> SESSIONNAME=Console
> SystemDrive=C:
> SystemRoot=C:\WINNT
> TEMP=C:\TEMP
> TMP=C:\TEMP
> TOMCAT_HOME=C:\tomcat5.0.28
>
UATDATA=C:\WINNT\system32\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE
> 77
> USERDNSDOMAIN=CORP.KBR.COM
> USERDOMAIN=HALHOUSTON
> USERNAME=bbnt752
> USERPROFILE=C:\Documents and Settings\bbnt752
> windir=C:\WINNT
>
>
------------------------------------------------------------------------
> ----
>
>
>
> N:\tasks\ant task for juliet>ant -diagnostics
> ------- Ant diagnostics report -------
> Apache Ant version 1.6.2 compiled on July 16 2004
>
> -------------------------------------------
>  Implementation Version (JDK1.2+ only)
> -------------------------------------------
> core tasks     : 1.6.2
> optional tasks : not available
>
> -------------------------------------------
>  ANT_HOME/lib jar listing
> -------------------------------------------
> ant.home: C:\installations\apache-ant-1.7.1
> ant-antlr.jar (5752 bytes)
> ant-apache-bcel.jar (8611 bytes)
> ant-apache-bsf.jar (3939 bytes)
> ant-apache-log4j.jar (3056 bytes)
> ant-apache-oro.jar (39627 bytes)
> ant-apache-regexp.jar (3762 bytes)
> ant-apache-resolver.jar (4071 bytes)
> ant-commons-logging.jar (3910 bytes)
> ant-commons-net.jar (47026 bytes)
> ant-jai.jar (21348 bytes)
> ant-javamail.jar (6998 bytes)
> ant-jdepend.jar (8132 bytes)
> ant-jmf.jar (6593 bytes)
> ant-jsch.jar (30797 bytes)
> ant-junit.jar (93518 bytes)
> ant-launcher.jar (12143 bytes)
> ant-netrexx.jar (9881 bytes)
> ant-nodeps.jar (431580 bytes)
> ant-starteam.jar (35355 bytes)
> ant-stylebook.jar (2330 bytes)
> ant-swing.jar (6738 bytes)
> ant-testutil.jar (14941 bytes)
> ant-trax.jar (6881 bytes)
> ant-weblogic.jar (14205 bytes)
> ant.jar (1323005 bytes)
> xercesImpl.jar (1223877 bytes)
> xml-apis.jar (194354 bytes)
>
> -------------------------------------------
>  Tasks availability
> -------------------------------------------
> importtypelib : Initialization error
> image : Missing dependency javax.media.jai.PlanarImage
> sshexec : Missing dependency com.jcraft.jsch.UserInfo
> replaceregexp : Initialization error
> test : Not Available
> icontract : Not Available
> scp : Missing dependency com.jcraft.jsch.UserInfo
> translate : Initialization error
> vajload : Not Available
> WsdlToDotnet : Initialization error
> jpcovmerge : Not Available
> cvsversion : Not Available
> ildasm : Initialization error
> maudit : Not Available
> antlr : Initialization error
> ftp : Initialization error
> jpcovreport : Not Available
> xmlvalidate : Initialization error
> cab : Initialization error
> jdepend : Missing dependency jdepend.xmlui.JDepend
> symlink : Initialization error
> mmetrics : Not Available
> junit : Initialization error
> vajexport : Not Available
> N:\tasks\ant task for juliet>ant -version
> Apache Ant version 1.6.2 compiled on July 16 2004
>
>
>
>
> -----Original Message-----
> From: Mike Stewart [mailto:MStewart@mgtplc.com] 
> Sent: 01 December 2008 11:42
> To: Ant Users List
> Subject: Re: ANT failing from command line
>
> 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" <Am...@kbr.com> 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: user-unsubscribe@ant.apache.org 
> For additional commands, e-mail: user-help@ant.apache.org 
>
>
> --
> 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: user-unsubscribe@ant.apache.org 
> For additional commands, e-mail: user-help@ant.apache.org 
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org 
> For additional commands, e-mail: user-help@ant.apache.org 
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org 
For additional commands, e-mail: user-help@ant.apache.org 


-- 
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: ANT failing from command line

Posted by Patrick Waugh <pt...@gmail.com>.
I think he's on Windows, so no "which" command.

Basically, your computer doesn't lie.  You have a prior version of Ant
in your path somewhere.  What I would do is first change to the
directory where you think you have installed the latest version of
Ant.  There, confirm when you do:

c:\ >ant -version

you get the version you are expecting.  Then, look at the definition
of your path environment variable, and look for the other version of
Ant in a path that precedes the one in which you have the latest
version installed.

You could also just do a search for ant.exe to find all versions
currently on your hard drive.

Patrick

On Tue, Dec 2, 2008 at 12:00 PM, Barry Pape <bp...@netspend.com> wrote:
> If you run the command 'which ant' does it return the location of the
> 1.6.2 version that is being picked up?
>
> -----Original Message-----
> From: Ammar Khalid [mailto:Ammar.Khalid@kbr.com]
> Sent: Monday, December 01, 2008 8:44 AM
> To: Ant Users List
> Subject: RE: ANT failing from command line
>
> Thanks Mike for helping me so far. I don't get a System Properties
> section. The only output that I get is:
>
> N:\>ant -version
> Apache Ant version 1.6.2 compiled on July 16 2004
> N:\>ant -diagnostics
> ------- Ant diagnostics report -------
> Apache Ant version 1.6.2 compiled on July 16 2004
>
> -------------------------------------------
>  Implementation Version (JDK1.2+ only)
> -------------------------------------------
> core tasks     : 1.6.2
> optional tasks : not available
>
> -------------------------------------------
>  ANT_HOME/lib jar listing
> -------------------------------------------
> ant.home: C:\eclipse\plugins\org.apache.ant_1.7.1
> ant-antlr.jar (5752 bytes)
> ant-apache-bcel.jar (8611 bytes)
> ant-apache-bsf.jar (3939 bytes)
> ant-apache-log4j.jar (3056 bytes)
> ant-apache-oro.jar (39627 bytes)
> ant-apache-regexp.jar (3762 bytes)
> ant-apache-resolver.jar (4071 bytes)
> ant-commons-logging.jar (3910 bytes)
> ant-commons-net.jar (47026 bytes)
> ant-jai.jar (21348 bytes)
> ant-javamail.jar (6998 bytes)
> ant-jdepend.jar (8132 bytes)
> ant-jmf.jar (6593 bytes)
> ant-jsch.jar (30797 bytes)
> ant-junit.jar (93518 bytes)
> ant-launcher.jar (12143 bytes)
> ant-netrexx.jar (9881 bytes)
> ant-nodeps.jar (431580 bytes)
> ant-starteam.jar (35355 bytes)
> ant-stylebook.jar (2330 bytes)
> ant-swing.jar (6738 bytes)
> ant-testutil.jar (14941 bytes)
> ant-trax.jar (6881 bytes)
> ant-weblogic.jar (14205 bytes)
> ant.jar (1323005 bytes)
> xercesImpl.jar (1223877 bytes)
> xml-apis.jar (194354 bytes)
>
> -------------------------------------------
>  Tasks availability
> -------------------------------------------
> importtypelib : Initialization error
> image : Missing dependency javax.media.jai.PlanarI
> sshexec : Missing dependency com.jcraft.jsch.UserI
> replaceregexp : Initialization error
> test : Not Available
> icontract : Not Available
> scp : Missing dependency com.jcraft.jsch.UserInfo
> translate : Initialization error
> vajload : Not Available
> WsdlToDotnet : Initialization error
> jpcovmerge : Not Available
> cvsversion : Not Available
> ildasm : Initialization error
> maudit : Not Available
> antlr : Initialization error
> ftp : Initialization error
> jpcovreport : Not Available
> xmlvalidate : Initialization error
> cab : Initialization error
> jdepend : Missing dependency jdepend.xmlui.JDepend
> symlink : Initialization error
> mmetrics : Not Available
> junit : Initialization error
> vajexport : Not Available
> N:\>
>
> -----Original Message-----
> From: Mike Stewart [mailto:MStewart@mgtplc.com]
> Sent: 01 December 2008 13:57
> To: Ant Users List
> Subject: RE: ANT failing from command line
>
> When you run the ant diagnostics what does it return in the system
> properties section?
>
> Mike S.
>
>
> 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: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
> -----------------------------------------
> Confidentiality Notice!
> This electronic transmission and any attached documents or other
> writings are confidential and are for the sole use of the intended
> recipient(s) identified above. This message may contain information
> that is privileged, confidential or otherwise protected from
> disclosure under applicable law. If the receiver of this
> information is not the intended recipient, or the employee, or
> agent responsible for delivering the information to the intended
> recipient, you are hereby notified that any use, reading,
> dissemination, distribution, copying or storage of this information
> is strictly prohibited. If you have received this information in
> error, please notify the sender by return email and delete the
> electronic transmission, including all attachments from your
> system.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: ANT failing from command line

Posted by Barry Pape <bp...@netspend.com>.
If you run the command 'which ant' does it return the location of the
1.6.2 version that is being picked up?

-----Original Message-----
From: Ammar Khalid [mailto:Ammar.Khalid@kbr.com] 
Sent: Monday, December 01, 2008 8:44 AM
To: Ant Users List
Subject: RE: ANT failing from command line

Thanks Mike for helping me so far. I don't get a System Properties
section. The only output that I get is:

N:\>ant -version
Apache Ant version 1.6.2 compiled on July 16 2004
N:\>ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.6.2 compiled on July 16 2004

-------------------------------------------
 Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks     : 1.6.2
optional tasks : not available

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: C:\eclipse\plugins\org.apache.ant_1.7.1
ant-antlr.jar (5752 bytes)
ant-apache-bcel.jar (8611 bytes)
ant-apache-bsf.jar (3939 bytes)
ant-apache-log4j.jar (3056 bytes)
ant-apache-oro.jar (39627 bytes)
ant-apache-regexp.jar (3762 bytes)
ant-apache-resolver.jar (4071 bytes)
ant-commons-logging.jar (3910 bytes)
ant-commons-net.jar (47026 bytes)
ant-jai.jar (21348 bytes)
ant-javamail.jar (6998 bytes)
ant-jdepend.jar (8132 bytes)
ant-jmf.jar (6593 bytes)
ant-jsch.jar (30797 bytes)
ant-junit.jar (93518 bytes)
ant-launcher.jar (12143 bytes)
ant-netrexx.jar (9881 bytes)
ant-nodeps.jar (431580 bytes)
ant-starteam.jar (35355 bytes)
ant-stylebook.jar (2330 bytes)
ant-swing.jar (6738 bytes)
ant-testutil.jar (14941 bytes)
ant-trax.jar (6881 bytes)
ant-weblogic.jar (14205 bytes)
ant.jar (1323005 bytes)
xercesImpl.jar (1223877 bytes)
xml-apis.jar (194354 bytes)

-------------------------------------------
 Tasks availability
-------------------------------------------
importtypelib : Initialization error
image : Missing dependency javax.media.jai.PlanarI
sshexec : Missing dependency com.jcraft.jsch.UserI
replaceregexp : Initialization error
test : Not Available
icontract : Not Available
scp : Missing dependency com.jcraft.jsch.UserInfo
translate : Initialization error
vajload : Not Available
WsdlToDotnet : Initialization error
jpcovmerge : Not Available
cvsversion : Not Available
ildasm : Initialization error
maudit : Not Available
antlr : Initialization error
ftp : Initialization error
jpcovreport : Not Available
xmlvalidate : Initialization error
cab : Initialization error
jdepend : Missing dependency jdepend.xmlui.JDepend
symlink : Initialization error
mmetrics : Not Available
junit : Initialization error
vajexport : Not Available
N:\>

-----Original Message-----
From: Mike Stewart [mailto:MStewart@mgtplc.com] 
Sent: 01 December 2008 13:57
To: Ant Users List
Subject: RE: ANT failing from command line

When you run the ant diagnostics what does it return in the system
properties section?

Mike S.


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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


-----------------------------------------
Confidentiality Notice!
This electronic transmission and any attached documents or other
writings are confidential and are for the sole use of the intended
recipient(s) identified above. This message may contain information
that is privileged, confidential or otherwise protected from
disclosure under applicable law. If the receiver of this
information is not the intended recipient, or the employee, or
agent responsible for delivering the information to the intended
recipient, you are hereby notified that any use, reading,
dissemination, distribution, copying or storage of this information
is strictly prohibited. If you have received this information in
error, please notify the sender by return email and delete the
electronic transmission, including all attachments from your
system.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: ANT failing from command line

Posted by Ammar Khalid <Am...@kbr.com>.
Thanks Mike for helping me so far. I don't get a System Properties
section. The only output that I get is:

N:\>ant -version
Apache Ant version 1.6.2 compiled on July 16 2004
N:\>ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.6.2 compiled on July 16 2004

-------------------------------------------
 Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks     : 1.6.2
optional tasks : not available

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: C:\eclipse\plugins\org.apache.ant_1.7.1
ant-antlr.jar (5752 bytes)
ant-apache-bcel.jar (8611 bytes)
ant-apache-bsf.jar (3939 bytes)
ant-apache-log4j.jar (3056 bytes)
ant-apache-oro.jar (39627 bytes)
ant-apache-regexp.jar (3762 bytes)
ant-apache-resolver.jar (4071 bytes)
ant-commons-logging.jar (3910 bytes)
ant-commons-net.jar (47026 bytes)
ant-jai.jar (21348 bytes)
ant-javamail.jar (6998 bytes)
ant-jdepend.jar (8132 bytes)
ant-jmf.jar (6593 bytes)
ant-jsch.jar (30797 bytes)
ant-junit.jar (93518 bytes)
ant-launcher.jar (12143 bytes)
ant-netrexx.jar (9881 bytes)
ant-nodeps.jar (431580 bytes)
ant-starteam.jar (35355 bytes)
ant-stylebook.jar (2330 bytes)
ant-swing.jar (6738 bytes)
ant-testutil.jar (14941 bytes)
ant-trax.jar (6881 bytes)
ant-weblogic.jar (14205 bytes)
ant.jar (1323005 bytes)
xercesImpl.jar (1223877 bytes)
xml-apis.jar (194354 bytes)

-------------------------------------------
 Tasks availability
-------------------------------------------
importtypelib : Initialization error
image : Missing dependency javax.media.jai.PlanarI
sshexec : Missing dependency com.jcraft.jsch.UserI
replaceregexp : Initialization error
test : Not Available
icontract : Not Available
scp : Missing dependency com.jcraft.jsch.UserInfo
translate : Initialization error
vajload : Not Available
WsdlToDotnet : Initialization error
jpcovmerge : Not Available
cvsversion : Not Available
ildasm : Initialization error
maudit : Not Available
antlr : Initialization error
ftp : Initialization error
jpcovreport : Not Available
xmlvalidate : Initialization error
cab : Initialization error
jdepend : Missing dependency jdepend.xmlui.JDepend
symlink : Initialization error
mmetrics : Not Available
junit : Initialization error
vajexport : Not Available
N:\>

-----Original Message-----
From: Mike Stewart [mailto:MStewart@mgtplc.com] 
Sent: 01 December 2008 13:57
To: Ant Users List
Subject: RE: ANT failing from command line

When you run the ant diagnostics what does it return in the system
properties section?

Mike S.


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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: ANT failing from command line

Posted by Mike Stewart <MS...@mgtplc.com>.
When you run the ant diagnostics what does it return in the system properties section?

Mike S.



>>> "Ammar Khalid" <Am...@kbr.com> 01/12/2008 13:18:19 >>>
I have checked the manifest file of my ant.jar and it shows:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 10.0-b22 (Sun Microsystems Inc.)
Main-Class: org.apache.tools.ant.Main

Name: org/apache/tools/ant/
Extension-name: org.apache.tools.ant
Specification-Title: Apache Ant
Specification-Version: 1.7.1
Specification-Vendor: Apache Software Foundation
Implementation-Title: org.apache.tools.ant
Implementation-Version: 1.7.1
Implementation-Vendor: Apache Software Foundation


I downloaded this from apache's website directly as a zip file. However
I must confess that on searching for ant.jar on my machines, I found
other ant.jar scattered around all over. However, how is it possible to
take on another ant.jar file, while the diagnostics output below clearly
says it is picking up ant.home: C:\installaions\apache-ant-1.7.1?


I also put the path to ANT_HOME\bin as the first entry in my PATH
variable. 

However it still shows the same output:

N:\>ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.6.2 compiled on July 16 2004

-------------------------------------------
 Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks     : 1.6.2
optional tasks : not available

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: C:\installations\apache-ant-1.7.1
ant-antlr.jar (5752 bytes)
ant-apache-bcel.jar (8611 bytes)
ant-apache-bsf.jar (3939 bytes)
ant-apache-log4j.jar (3056 bytes)
ant-apache-oro.jar (39627 bytes)
ant-apache-regexp.jar (3762 bytes)
ant-apache-resolver.jar (4071 bytes)
ant-commons-logging.jar (3910 bytes)
ant-commons-net.jar (47026 bytes)
ant-jai.jar (21348 bytes)
ant-javamail.jar (6998 bytes)
ant-jdepend.jar (8132 bytes)
ant-jmf.jar (6593 bytes)
ant-jsch.jar (30797 bytes)
ant-junit.jar (93518 bytes)
ant-launcher.jar (12143 bytes)
ant-netrexx.jar (9881 bytes)
ant-nodeps.jar (431580 bytes)
ant-starteam.jar (35355 bytes)
ant-stylebook.jar (2330 bytes)
ant-swing.jar (6738 bytes)
ant-testutil.jar (14941 bytes)
ant-trax.jar (6881 bytes)
ant-weblogic.jar (14205 bytes)
ant.jar (1323005 bytes)
xercesImpl.jar (1223877 bytes)
xml-apis.jar (194354 bytes)

-------------------------------------------
 Tasks availability
-------------------------------------------
importtypelib : Initialization error
image : Missing dependency javax.media.jai.PlanarImage
sshexec : Missing dependency com.jcraft.jsch.UserInfo
replaceregexp : Initialization error
test : Not Available
icontract : Not Available
scp : Missing dependency com.jcraft.jsch.UserInfo
translate : Initialization error
vajload : Not Available
WsdlToDotnet : Initialization error
jpcovmerge : Not Available
cvsversion : Not Available
ildasm : Initialization error
maudit : Not Available
antlr : Initialization error
ftp : Initialization error
jpcovreport : Not Available
xmlvalidate : Initialization error
cab : Initialization error
jdepend : Missing dependency jdepend.xmlui.JDepend
symlink : Initialization error
mmetrics : Not Available
junit : Initialization error
vajexport : Not Available
N:\>

-----Original Message-----
From: Greg Roodt [mailto:groodt@gmail.com] 
Sent: 01 December 2008 12:11
To: Ant Users List
Subject: Re: ANT failing from command line

How sure are you that you are have Ant 1.7.1? Here is my output and
there
are size differences in the jars.
U:\>ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.7.1 compiled on September 23 2008

-------------------------------------------
 Implementation Version
-------------------------------------------
core tasks     : 1.7.1
optional tasks : not available

-------------------------------------------
 ANT PROPERTIES
-------------------------------------------
ant.version: Apache Ant version 1.7.1 compiled on September 23 2008
ant.java.version: 1.5
ant.core.lib: C:\apps\apache-ant-1.7.1\lib\ant.jar
ant.home: c:\apps\apache-ant-1.7.1

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: c:\apps\apache-ant-1.7.1
ant-antlr.jar (5756 bytes)
ant-apache-bcel.jar (8615 bytes)
ant-apache-bsf.jar (3933 bytes)
ant-apache-log4j.jar (3060 bytes)
ant-apache-oro.jar (39654 bytes)
ant-apache-regexp.jar (3766 bytes)
ant-apache-resolver.jar (4075 bytes)
ant-commons-logging.jar (3914 bytes)
ant-commons-net.jar (47167 bytes)
ant-jdepend.jar (8126 bytes)
ant-jmf.jar (6597 bytes)
ant-jsch.jar (30802 bytes)
ant-junit.jar (93550 bytes)
ant-launcher.jar (12147 bytes)
ant-nodeps.jar (431047 bytes)
ant-swing.jar (6767 bytes)
ant-testutil.jar (14944 bytes)
ant-trax.jar (6885 bytes)
ant.jar (1322912 bytes)
commons-net-1.4.0.jar (180799 bytes)
oro-2.0.8.jar (65261 bytes)
xercesImpl.jar (1223877 bytes)
xml-apis.jar (194354 bytes)

I would suggest getting a clean download of Ant 1.7.1 and extracting it
at a
new location. Resetting ANT_HOME to this new location and ensuring that
ANT_HOME\bin is the first entry in your PATH. At the moment,
ANT_HOME\bin is
the last entry in your PATH and I am not sure if there could be an Ant
executable that gets picked up earlier.

Cheers
Greg



On Mon, Dec 1, 2008 at 11:56 AM, Ammar Khalid <Am...@kbr.com>
wrote:

> 1- After running the SET at DOS, as you can see ANT_HOME is set to:
> C:\installations\apache-ant-1.7.1
>
> 2- Also in the PATH env variable, you can see, the path to ant is:
> C:\installations\apache-ant-1.7.1\bin
>
> 3- I also ran ant -diagnostics and the output is below after the
output
> to SET
>
>
------------------------------------------------------------------------
> N:\tasks\ant task for juliet>SET
> ALLUSERSPROFILE=C:\Documents and Settings\All Users
> ANT_HOME=C:\installations\apache-ant-1.7.1
> APPDATA=C:\Documents and Settings\bbnt752\Application Data
> CLASSPATH=C:\Program
> Files\Documentum\dctm.jar;C:\Documentum\config;C:\Program F
> iles\Documentum\java\1.4.2_11\bin;
> C:\installations\apache-ant-1.7.1\lib\ant.jar
>
> CommonProgramFiles=C:\Program Files\Common Files
> COMPUTERNAME=KEAUK05169
> ComSpec=C:\WINNT\system32\cmd.exe
> FP_NO_HOST_CHECK=NO
> HOMEDRIVE=N:
> HOMEPATH=\
> HOMESHARE=\\LONFILE307\HOME$\bbnt752 
> JAD_HOME=C:\jadnt158
> JAVA_HOME=C:\j2sdk1.4.2_13
> LOGONSERVER=\\LONDCGC301
> NUMBER_OF_PROCESSORS=2
> OS=Windows_NT
> Path=C:\Program
> Files\Documentum\Shared;c:\Oracle\Ora920\bin;C:\Oracle\Ora817\bi
> n;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program
> Files\Business Ob
> jects\common\3.5\bin\NOTES\DATA;C:\Program Files\Business
> Objects\common\3.5\bin
> \NOTES;C:\Program Files\Windows
> Imaging\;C:\j2sdk1.4.2_13\bin;C:\jadnt158;C:\Pro
> gram Files\CollabNet Subversion Server;C:\Program
> Files\TortoiseSVN\bin;C:\insta
> llations\apache-ant-1.7.1\bin
> PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
> PROCESSOR_ARCHITECTURE=x86
> PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel
> PROCESSOR_LEVEL=15
> PROCESSOR_REVISION=0403
> ProgramFiles=C:\Program Files
> PROMPT=$P$G
> SESSIONNAME=Console
> SystemDrive=C:
> SystemRoot=C:\WINNT
> TEMP=C:\TEMP
> TMP=C:\TEMP
> TOMCAT_HOME=C:\tomcat5.0.28
>
UATDATA=C:\WINNT\system32\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE
> 77
> USERDNSDOMAIN=CORP.KBR.COM
> USERDOMAIN=HALHOUSTON
> USERNAME=bbnt752
> USERPROFILE=C:\Documents and Settings\bbnt752
> windir=C:\WINNT
>
>
------------------------------------------------------------------------
> ----
>
>
>
> N:\tasks\ant task for juliet>ant -diagnostics
> ------- Ant diagnostics report -------
> Apache Ant version 1.6.2 compiled on July 16 2004
>
> -------------------------------------------
>  Implementation Version (JDK1.2+ only)
> -------------------------------------------
> core tasks     : 1.6.2
> optional tasks : not available
>
> -------------------------------------------
>  ANT_HOME/lib jar listing
> -------------------------------------------
> ant.home: C:\installations\apache-ant-1.7.1
> ant-antlr.jar (5752 bytes)
> ant-apache-bcel.jar (8611 bytes)
> ant-apache-bsf.jar (3939 bytes)
> ant-apache-log4j.jar (3056 bytes)
> ant-apache-oro.jar (39627 bytes)
> ant-apache-regexp.jar (3762 bytes)
> ant-apache-resolver.jar (4071 bytes)
> ant-commons-logging.jar (3910 bytes)
> ant-commons-net.jar (47026 bytes)
> ant-jai.jar (21348 bytes)
> ant-javamail.jar (6998 bytes)
> ant-jdepend.jar (8132 bytes)
> ant-jmf.jar (6593 bytes)
> ant-jsch.jar (30797 bytes)
> ant-junit.jar (93518 bytes)
> ant-launcher.jar (12143 bytes)
> ant-netrexx.jar (9881 bytes)
> ant-nodeps.jar (431580 bytes)
> ant-starteam.jar (35355 bytes)
> ant-stylebook.jar (2330 bytes)
> ant-swing.jar (6738 bytes)
> ant-testutil.jar (14941 bytes)
> ant-trax.jar (6881 bytes)
> ant-weblogic.jar (14205 bytes)
> ant.jar (1323005 bytes)
> xercesImpl.jar (1223877 bytes)
> xml-apis.jar (194354 bytes)
>
> -------------------------------------------
>  Tasks availability
> -------------------------------------------
> importtypelib : Initialization error
> image : Missing dependency javax.media.jai.PlanarImage
> sshexec : Missing dependency com.jcraft.jsch.UserInfo
> replaceregexp : Initialization error
> test : Not Available
> icontract : Not Available
> scp : Missing dependency com.jcraft.jsch.UserInfo
> translate : Initialization error
> vajload : Not Available
> WsdlToDotnet : Initialization error
> jpcovmerge : Not Available
> cvsversion : Not Available
> ildasm : Initialization error
> maudit : Not Available
> antlr : Initialization error
> ftp : Initialization error
> jpcovreport : Not Available
> xmlvalidate : Initialization error
> cab : Initialization error
> jdepend : Missing dependency jdepend.xmlui.JDepend
> symlink : Initialization error
> mmetrics : Not Available
> junit : Initialization error
> vajexport : Not Available
> N:\tasks\ant task for juliet>ant -version
> Apache Ant version 1.6.2 compiled on July 16 2004
>
>
>
>
> -----Original Message-----
> From: Mike Stewart [mailto:MStewart@mgtplc.com] 
> Sent: 01 December 2008 11:42
> To: Ant Users List
> Subject: Re: ANT failing from command line
>
> 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" <Am...@kbr.com> 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: user-unsubscribe@ant.apache.org 
> For additional commands, e-mail: user-help@ant.apache.org 
>
>
> --
> 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: user-unsubscribe@ant.apache.org 
> For additional commands, e-mail: user-help@ant.apache.org 
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org 
> For additional commands, e-mail: user-help@ant.apache.org 
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org 
For additional commands, e-mail: user-help@ant.apache.org 


-- 
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: ANT failing from command line

Posted by Ammar Khalid <Am...@kbr.com>.
I have checked the manifest file of my ant.jar and it shows:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 10.0-b22 (Sun Microsystems Inc.)
Main-Class: org.apache.tools.ant.Main

Name: org/apache/tools/ant/
Extension-name: org.apache.tools.ant
Specification-Title: Apache Ant
Specification-Version: 1.7.1
Specification-Vendor: Apache Software Foundation
Implementation-Title: org.apache.tools.ant
Implementation-Version: 1.7.1
Implementation-Vendor: Apache Software Foundation


I downloaded this from apache's website directly as a zip file. However
I must confess that on searching for ant.jar on my machines, I found
other ant.jar scattered around all over. However, how is it possible to
take on another ant.jar file, while the diagnostics output below clearly
says it is picking up ant.home: C:\installaions\apache-ant-1.7.1?


I also put the path to ANT_HOME\bin as the first entry in my PATH
variable. 

However it still shows the same output:

N:\>ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.6.2 compiled on July 16 2004

-------------------------------------------
 Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks     : 1.6.2
optional tasks : not available

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: C:\installations\apache-ant-1.7.1
ant-antlr.jar (5752 bytes)
ant-apache-bcel.jar (8611 bytes)
ant-apache-bsf.jar (3939 bytes)
ant-apache-log4j.jar (3056 bytes)
ant-apache-oro.jar (39627 bytes)
ant-apache-regexp.jar (3762 bytes)
ant-apache-resolver.jar (4071 bytes)
ant-commons-logging.jar (3910 bytes)
ant-commons-net.jar (47026 bytes)
ant-jai.jar (21348 bytes)
ant-javamail.jar (6998 bytes)
ant-jdepend.jar (8132 bytes)
ant-jmf.jar (6593 bytes)
ant-jsch.jar (30797 bytes)
ant-junit.jar (93518 bytes)
ant-launcher.jar (12143 bytes)
ant-netrexx.jar (9881 bytes)
ant-nodeps.jar (431580 bytes)
ant-starteam.jar (35355 bytes)
ant-stylebook.jar (2330 bytes)
ant-swing.jar (6738 bytes)
ant-testutil.jar (14941 bytes)
ant-trax.jar (6881 bytes)
ant-weblogic.jar (14205 bytes)
ant.jar (1323005 bytes)
xercesImpl.jar (1223877 bytes)
xml-apis.jar (194354 bytes)

-------------------------------------------
 Tasks availability
-------------------------------------------
importtypelib : Initialization error
image : Missing dependency javax.media.jai.PlanarImage
sshexec : Missing dependency com.jcraft.jsch.UserInfo
replaceregexp : Initialization error
test : Not Available
icontract : Not Available
scp : Missing dependency com.jcraft.jsch.UserInfo
translate : Initialization error
vajload : Not Available
WsdlToDotnet : Initialization error
jpcovmerge : Not Available
cvsversion : Not Available
ildasm : Initialization error
maudit : Not Available
antlr : Initialization error
ftp : Initialization error
jpcovreport : Not Available
xmlvalidate : Initialization error
cab : Initialization error
jdepend : Missing dependency jdepend.xmlui.JDepend
symlink : Initialization error
mmetrics : Not Available
junit : Initialization error
vajexport : Not Available
N:\>

-----Original Message-----
From: Greg Roodt [mailto:groodt@gmail.com] 
Sent: 01 December 2008 12:11
To: Ant Users List
Subject: Re: ANT failing from command line

How sure are you that you are have Ant 1.7.1? Here is my output and
there
are size differences in the jars.
U:\>ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.7.1 compiled on September 23 2008

-------------------------------------------
 Implementation Version
-------------------------------------------
core tasks     : 1.7.1
optional tasks : not available

-------------------------------------------
 ANT PROPERTIES
-------------------------------------------
ant.version: Apache Ant version 1.7.1 compiled on September 23 2008
ant.java.version: 1.5
ant.core.lib: C:\apps\apache-ant-1.7.1\lib\ant.jar
ant.home: c:\apps\apache-ant-1.7.1

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: c:\apps\apache-ant-1.7.1
ant-antlr.jar (5756 bytes)
ant-apache-bcel.jar (8615 bytes)
ant-apache-bsf.jar (3933 bytes)
ant-apache-log4j.jar (3060 bytes)
ant-apache-oro.jar (39654 bytes)
ant-apache-regexp.jar (3766 bytes)
ant-apache-resolver.jar (4075 bytes)
ant-commons-logging.jar (3914 bytes)
ant-commons-net.jar (47167 bytes)
ant-jdepend.jar (8126 bytes)
ant-jmf.jar (6597 bytes)
ant-jsch.jar (30802 bytes)
ant-junit.jar (93550 bytes)
ant-launcher.jar (12147 bytes)
ant-nodeps.jar (431047 bytes)
ant-swing.jar (6767 bytes)
ant-testutil.jar (14944 bytes)
ant-trax.jar (6885 bytes)
ant.jar (1322912 bytes)
commons-net-1.4.0.jar (180799 bytes)
oro-2.0.8.jar (65261 bytes)
xercesImpl.jar (1223877 bytes)
xml-apis.jar (194354 bytes)

I would suggest getting a clean download of Ant 1.7.1 and extracting it
at a
new location. Resetting ANT_HOME to this new location and ensuring that
ANT_HOME\bin is the first entry in your PATH. At the moment,
ANT_HOME\bin is
the last entry in your PATH and I am not sure if there could be an Ant
executable that gets picked up earlier.

Cheers
Greg



On Mon, Dec 1, 2008 at 11:56 AM, Ammar Khalid <Am...@kbr.com>
wrote:

> 1- After running the SET at DOS, as you can see ANT_HOME is set to:
> C:\installations\apache-ant-1.7.1
>
> 2- Also in the PATH env variable, you can see, the path to ant is:
> C:\installations\apache-ant-1.7.1\bin
>
> 3- I also ran ant -diagnostics and the output is below after the
output
> to SET
>
>
------------------------------------------------------------------------
> N:\tasks\ant task for juliet>SET
> ALLUSERSPROFILE=C:\Documents and Settings\All Users
> ANT_HOME=C:\installations\apache-ant-1.7.1
> APPDATA=C:\Documents and Settings\bbnt752\Application Data
> CLASSPATH=C:\Program
> Files\Documentum\dctm.jar;C:\Documentum\config;C:\Program F
> iles\Documentum\java\1.4.2_11\bin;
> C:\installations\apache-ant-1.7.1\lib\ant.jar
>
> CommonProgramFiles=C:\Program Files\Common Files
> COMPUTERNAME=KEAUK05169
> ComSpec=C:\WINNT\system32\cmd.exe
> FP_NO_HOST_CHECK=NO
> HOMEDRIVE=N:
> HOMEPATH=\
> HOMESHARE=\\LONFILE307\HOME$\bbnt752
> JAD_HOME=C:\jadnt158
> JAVA_HOME=C:\j2sdk1.4.2_13
> LOGONSERVER=\\LONDCGC301
> NUMBER_OF_PROCESSORS=2
> OS=Windows_NT
> Path=C:\Program
> Files\Documentum\Shared;c:\Oracle\Ora920\bin;C:\Oracle\Ora817\bi
> n;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program
> Files\Business Ob
> jects\common\3.5\bin\NOTES\DATA;C:\Program Files\Business
> Objects\common\3.5\bin
> \NOTES;C:\Program Files\Windows
> Imaging\;C:\j2sdk1.4.2_13\bin;C:\jadnt158;C:\Pro
> gram Files\CollabNet Subversion Server;C:\Program
> Files\TortoiseSVN\bin;C:\insta
> llations\apache-ant-1.7.1\bin
> PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
> PROCESSOR_ARCHITECTURE=x86
> PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel
> PROCESSOR_LEVEL=15
> PROCESSOR_REVISION=0403
> ProgramFiles=C:\Program Files
> PROMPT=$P$G
> SESSIONNAME=Console
> SystemDrive=C:
> SystemRoot=C:\WINNT
> TEMP=C:\TEMP
> TMP=C:\TEMP
> TOMCAT_HOME=C:\tomcat5.0.28
>
UATDATA=C:\WINNT\system32\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE
> 77
> USERDNSDOMAIN=CORP.KBR.COM
> USERDOMAIN=HALHOUSTON
> USERNAME=bbnt752
> USERPROFILE=C:\Documents and Settings\bbnt752
> windir=C:\WINNT
>
>
------------------------------------------------------------------------
> ----
>
>
>
> N:\tasks\ant task for juliet>ant -diagnostics
> ------- Ant diagnostics report -------
> Apache Ant version 1.6.2 compiled on July 16 2004
>
> -------------------------------------------
>  Implementation Version (JDK1.2+ only)
> -------------------------------------------
> core tasks     : 1.6.2
> optional tasks : not available
>
> -------------------------------------------
>  ANT_HOME/lib jar listing
> -------------------------------------------
> ant.home: C:\installations\apache-ant-1.7.1
> ant-antlr.jar (5752 bytes)
> ant-apache-bcel.jar (8611 bytes)
> ant-apache-bsf.jar (3939 bytes)
> ant-apache-log4j.jar (3056 bytes)
> ant-apache-oro.jar (39627 bytes)
> ant-apache-regexp.jar (3762 bytes)
> ant-apache-resolver.jar (4071 bytes)
> ant-commons-logging.jar (3910 bytes)
> ant-commons-net.jar (47026 bytes)
> ant-jai.jar (21348 bytes)
> ant-javamail.jar (6998 bytes)
> ant-jdepend.jar (8132 bytes)
> ant-jmf.jar (6593 bytes)
> ant-jsch.jar (30797 bytes)
> ant-junit.jar (93518 bytes)
> ant-launcher.jar (12143 bytes)
> ant-netrexx.jar (9881 bytes)
> ant-nodeps.jar (431580 bytes)
> ant-starteam.jar (35355 bytes)
> ant-stylebook.jar (2330 bytes)
> ant-swing.jar (6738 bytes)
> ant-testutil.jar (14941 bytes)
> ant-trax.jar (6881 bytes)
> ant-weblogic.jar (14205 bytes)
> ant.jar (1323005 bytes)
> xercesImpl.jar (1223877 bytes)
> xml-apis.jar (194354 bytes)
>
> -------------------------------------------
>  Tasks availability
> -------------------------------------------
> importtypelib : Initialization error
> image : Missing dependency javax.media.jai.PlanarImage
> sshexec : Missing dependency com.jcraft.jsch.UserInfo
> replaceregexp : Initialization error
> test : Not Available
> icontract : Not Available
> scp : Missing dependency com.jcraft.jsch.UserInfo
> translate : Initialization error
> vajload : Not Available
> WsdlToDotnet : Initialization error
> jpcovmerge : Not Available
> cvsversion : Not Available
> ildasm : Initialization error
> maudit : Not Available
> antlr : Initialization error
> ftp : Initialization error
> jpcovreport : Not Available
> xmlvalidate : Initialization error
> cab : Initialization error
> jdepend : Missing dependency jdepend.xmlui.JDepend
> symlink : Initialization error
> mmetrics : Not Available
> junit : Initialization error
> vajexport : Not Available
> N:\tasks\ant task for juliet>ant -version
> Apache Ant version 1.6.2 compiled on July 16 2004
>
>
>
>
> -----Original Message-----
> From: Mike Stewart [mailto:MStewart@mgtplc.com]
> Sent: 01 December 2008 11:42
> To: Ant Users List
> Subject: Re: ANT failing from command line
>
> 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" <Am...@kbr.com> 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: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
> --
> 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: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: ANT failing from command line

Posted by Greg Roodt <gr...@gmail.com>.
How sure are you that you are have Ant 1.7.1? Here is my output and there
are size differences in the jars.
U:\>ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.7.1 compiled on September 23 2008

-------------------------------------------
 Implementation Version
-------------------------------------------
core tasks     : 1.7.1
optional tasks : not available

-------------------------------------------
 ANT PROPERTIES
-------------------------------------------
ant.version: Apache Ant version 1.7.1 compiled on September 23 2008
ant.java.version: 1.5
ant.core.lib: C:\apps\apache-ant-1.7.1\lib\ant.jar
ant.home: c:\apps\apache-ant-1.7.1

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: c:\apps\apache-ant-1.7.1
ant-antlr.jar (5756 bytes)
ant-apache-bcel.jar (8615 bytes)
ant-apache-bsf.jar (3933 bytes)
ant-apache-log4j.jar (3060 bytes)
ant-apache-oro.jar (39654 bytes)
ant-apache-regexp.jar (3766 bytes)
ant-apache-resolver.jar (4075 bytes)
ant-commons-logging.jar (3914 bytes)
ant-commons-net.jar (47167 bytes)
ant-jdepend.jar (8126 bytes)
ant-jmf.jar (6597 bytes)
ant-jsch.jar (30802 bytes)
ant-junit.jar (93550 bytes)
ant-launcher.jar (12147 bytes)
ant-nodeps.jar (431047 bytes)
ant-swing.jar (6767 bytes)
ant-testutil.jar (14944 bytes)
ant-trax.jar (6885 bytes)
ant.jar (1322912 bytes)
commons-net-1.4.0.jar (180799 bytes)
oro-2.0.8.jar (65261 bytes)
xercesImpl.jar (1223877 bytes)
xml-apis.jar (194354 bytes)

I would suggest getting a clean download of Ant 1.7.1 and extracting it at a
new location. Resetting ANT_HOME to this new location and ensuring that
ANT_HOME\bin is the first entry in your PATH. At the moment, ANT_HOME\bin is
the last entry in your PATH and I am not sure if there could be an Ant
executable that gets picked up earlier.

Cheers
Greg



On Mon, Dec 1, 2008 at 11:56 AM, Ammar Khalid <Am...@kbr.com> wrote:

> 1- After running the SET at DOS, as you can see ANT_HOME is set to:
> C:\installations\apache-ant-1.7.1
>
> 2- Also in the PATH env variable, you can see, the path to ant is:
> C:\installations\apache-ant-1.7.1\bin
>
> 3- I also ran ant -diagnostics and the output is below after the output
> to SET
>
> ------------------------------------------------------------------------
> N:\tasks\ant task for juliet>SET
> ALLUSERSPROFILE=C:\Documents and Settings\All Users
> ANT_HOME=C:\installations\apache-ant-1.7.1
> APPDATA=C:\Documents and Settings\bbnt752\Application Data
> CLASSPATH=C:\Program
> Files\Documentum\dctm.jar;C:\Documentum\config;C:\Program F
> iles\Documentum\java\1.4.2_11\bin;
> C:\installations\apache-ant-1.7.1\lib\ant.jar
>
> CommonProgramFiles=C:\Program Files\Common Files
> COMPUTERNAME=KEAUK05169
> ComSpec=C:\WINNT\system32\cmd.exe
> FP_NO_HOST_CHECK=NO
> HOMEDRIVE=N:
> HOMEPATH=\
> HOMESHARE=\\LONFILE307\HOME$\bbnt752
> JAD_HOME=C:\jadnt158
> JAVA_HOME=C:\j2sdk1.4.2_13
> LOGONSERVER=\\LONDCGC301
> NUMBER_OF_PROCESSORS=2
> OS=Windows_NT
> Path=C:\Program
> Files\Documentum\Shared;c:\Oracle\Ora920\bin;C:\Oracle\Ora817\bi
> n;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program
> Files\Business Ob
> jects\common\3.5\bin\NOTES\DATA;C:\Program Files\Business
> Objects\common\3.5\bin
> \NOTES;C:\Program Files\Windows
> Imaging\;C:\j2sdk1.4.2_13\bin;C:\jadnt158;C:\Pro
> gram Files\CollabNet Subversion Server;C:\Program
> Files\TortoiseSVN\bin;C:\insta
> llations\apache-ant-1.7.1\bin
> PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
> PROCESSOR_ARCHITECTURE=x86
> PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel
> PROCESSOR_LEVEL=15
> PROCESSOR_REVISION=0403
> ProgramFiles=C:\Program Files
> PROMPT=$P$G
> SESSIONNAME=Console
> SystemDrive=C:
> SystemRoot=C:\WINNT
> TEMP=C:\TEMP
> TMP=C:\TEMP
> TOMCAT_HOME=C:\tomcat5.0.28
> UATDATA=C:\WINNT\system32\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE
> 77
> USERDNSDOMAIN=CORP.KBR.COM
> USERDOMAIN=HALHOUSTON
> USERNAME=bbnt752
> USERPROFILE=C:\Documents and Settings\bbnt752
> windir=C:\WINNT
>
> ------------------------------------------------------------------------
> ----
>
>
>
> N:\tasks\ant task for juliet>ant -diagnostics
> ------- Ant diagnostics report -------
> Apache Ant version 1.6.2 compiled on July 16 2004
>
> -------------------------------------------
>  Implementation Version (JDK1.2+ only)
> -------------------------------------------
> core tasks     : 1.6.2
> optional tasks : not available
>
> -------------------------------------------
>  ANT_HOME/lib jar listing
> -------------------------------------------
> ant.home: C:\installations\apache-ant-1.7.1
> ant-antlr.jar (5752 bytes)
> ant-apache-bcel.jar (8611 bytes)
> ant-apache-bsf.jar (3939 bytes)
> ant-apache-log4j.jar (3056 bytes)
> ant-apache-oro.jar (39627 bytes)
> ant-apache-regexp.jar (3762 bytes)
> ant-apache-resolver.jar (4071 bytes)
> ant-commons-logging.jar (3910 bytes)
> ant-commons-net.jar (47026 bytes)
> ant-jai.jar (21348 bytes)
> ant-javamail.jar (6998 bytes)
> ant-jdepend.jar (8132 bytes)
> ant-jmf.jar (6593 bytes)
> ant-jsch.jar (30797 bytes)
> ant-junit.jar (93518 bytes)
> ant-launcher.jar (12143 bytes)
> ant-netrexx.jar (9881 bytes)
> ant-nodeps.jar (431580 bytes)
> ant-starteam.jar (35355 bytes)
> ant-stylebook.jar (2330 bytes)
> ant-swing.jar (6738 bytes)
> ant-testutil.jar (14941 bytes)
> ant-trax.jar (6881 bytes)
> ant-weblogic.jar (14205 bytes)
> ant.jar (1323005 bytes)
> xercesImpl.jar (1223877 bytes)
> xml-apis.jar (194354 bytes)
>
> -------------------------------------------
>  Tasks availability
> -------------------------------------------
> importtypelib : Initialization error
> image : Missing dependency javax.media.jai.PlanarImage
> sshexec : Missing dependency com.jcraft.jsch.UserInfo
> replaceregexp : Initialization error
> test : Not Available
> icontract : Not Available
> scp : Missing dependency com.jcraft.jsch.UserInfo
> translate : Initialization error
> vajload : Not Available
> WsdlToDotnet : Initialization error
> jpcovmerge : Not Available
> cvsversion : Not Available
> ildasm : Initialization error
> maudit : Not Available
> antlr : Initialization error
> ftp : Initialization error
> jpcovreport : Not Available
> xmlvalidate : Initialization error
> cab : Initialization error
> jdepend : Missing dependency jdepend.xmlui.JDepend
> symlink : Initialization error
> mmetrics : Not Available
> junit : Initialization error
> vajexport : Not Available
> N:\tasks\ant task for juliet>ant -version
> Apache Ant version 1.6.2 compiled on July 16 2004
>
>
>
>
> -----Original Message-----
> From: Mike Stewart [mailto:MStewart@mgtplc.com]
> Sent: 01 December 2008 11:42
> To: Ant Users List
> Subject: Re: ANT failing from command line
>
> 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" <Am...@kbr.com> 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: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
> --
> 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: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

RE: ANT failing from command line

Posted by Mike Stewart <MS...@mgtplc.com>.
It must be picking up another installation of ANT from somewhere, do a search for ant on the hard drive and open the ant.jar file and inside there open the manifest.mf file that will give you the version of the ant installation.

Mike S.



>>> "Ammar Khalid" <Am...@kbr.com> 01/12/2008 11:56:45 >>>
1- After running the SET at DOS, as you can see ANT_HOME is set to:
C:\installations\apache-ant-1.7.1

2- Also in the PATH env variable, you can see, the path to ant is:
C:\installations\apache-ant-1.7.1\bin

3- I also ran ant -diagnostics and the output is below after the output
to SET

------------------------------------------------------------------------
N:\tasks\ant task for juliet>SET
ALLUSERSPROFILE=C:\Documents and Settings\All Users
ANT_HOME=C:\installations\apache-ant-1.7.1
APPDATA=C:\Documents and Settings\bbnt752\Application Data
CLASSPATH=C:\Program
Files\Documentum\dctm.jar;C:\Documentum\config;C:\Program F
iles\Documentum\java\1.4.2_11\bin;
C:\installations\apache-ant-1.7.1\lib\ant.jar

CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=KEAUK05169
ComSpec=C:\WINNT\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=N:
HOMEPATH=\
HOMESHARE=\\LONFILE307\HOME$\bbnt752 
JAD_HOME=C:\jadnt158
JAVA_HOME=C:\j2sdk1.4.2_13
LOGONSERVER=\\LONDCGC301
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Program
Files\Documentum\Shared;c:\Oracle\Ora920\bin;C:\Oracle\Ora817\bi
n;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program
Files\Business Ob
jects\common\3.5\bin\NOTES\DATA;C:\Program Files\Business
Objects\common\3.5\bin
\NOTES;C:\Program Files\Windows
Imaging\;C:\j2sdk1.4.2_13\bin;C:\jadnt158;C:\Pro
gram Files\CollabNet Subversion Server;C:\Program
Files\TortoiseSVN\bin;C:\insta
llations\apache-ant-1.7.1\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0403
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINNT
TEMP=C:\TEMP
TMP=C:\TEMP
TOMCAT_HOME=C:\tomcat5.0.28
UATDATA=C:\WINNT\system32\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE
77
USERDNSDOMAIN=CORP.KBR.COM
USERDOMAIN=HALHOUSTON
USERNAME=bbnt752
USERPROFILE=C:\Documents and Settings\bbnt752
windir=C:\WINNT

------------------------------------------------------------------------
----



N:\tasks\ant task for juliet>ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.6.2 compiled on July 16 2004

-------------------------------------------
 Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks     : 1.6.2
optional tasks : not available

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: C:\installations\apache-ant-1.7.1
ant-antlr.jar (5752 bytes)
ant-apache-bcel.jar (8611 bytes)
ant-apache-bsf.jar (3939 bytes)
ant-apache-log4j.jar (3056 bytes)
ant-apache-oro.jar (39627 bytes)
ant-apache-regexp.jar (3762 bytes)
ant-apache-resolver.jar (4071 bytes)
ant-commons-logging.jar (3910 bytes)
ant-commons-net.jar (47026 bytes)
ant-jai.jar (21348 bytes)
ant-javamail.jar (6998 bytes)
ant-jdepend.jar (8132 bytes)
ant-jmf.jar (6593 bytes)
ant-jsch.jar (30797 bytes)
ant-junit.jar (93518 bytes)
ant-launcher.jar (12143 bytes)
ant-netrexx.jar (9881 bytes)
ant-nodeps.jar (431580 bytes)
ant-starteam.jar (35355 bytes)
ant-stylebook.jar (2330 bytes)
ant-swing.jar (6738 bytes)
ant-testutil.jar (14941 bytes)
ant-trax.jar (6881 bytes)
ant-weblogic.jar (14205 bytes)
ant.jar (1323005 bytes)
xercesImpl.jar (1223877 bytes)
xml-apis.jar (194354 bytes)

-------------------------------------------
 Tasks availability
-------------------------------------------
importtypelib : Initialization error
image : Missing dependency javax.media.jai.PlanarImage
sshexec : Missing dependency com.jcraft.jsch.UserInfo
replaceregexp : Initialization error
test : Not Available
icontract : Not Available
scp : Missing dependency com.jcraft.jsch.UserInfo
translate : Initialization error
vajload : Not Available
WsdlToDotnet : Initialization error
jpcovmerge : Not Available
cvsversion : Not Available
ildasm : Initialization error
maudit : Not Available
antlr : Initialization error
ftp : Initialization error
jpcovreport : Not Available
xmlvalidate : Initialization error
cab : Initialization error
jdepend : Missing dependency jdepend.xmlui.JDepend
symlink : Initialization error
mmetrics : Not Available
junit : Initialization error
vajexport : Not Available
N:\tasks\ant task for juliet>ant -version
Apache Ant version 1.6.2 compiled on July 16 2004




-----Original Message-----
From: Mike Stewart [mailto:MStewart@mgtplc.com] 
Sent: 01 December 2008 11:42
To: Ant Users List
Subject: Re: ANT failing from command line

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" <Am...@kbr.com> 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: user-unsubscribe@ant.apache.org 
For additional commands, e-mail: user-help@ant.apache.org 


-- 
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: user-unsubscribe@ant.apache.org 
For additional commands, e-mail: user-help@ant.apache.org 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org 
For additional commands, e-mail: user-help@ant.apache.org 


-- 
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: ANT failing from command line

Posted by Ammar Khalid <Am...@kbr.com>.
1- After running the SET at DOS, as you can see ANT_HOME is set to:
C:\installations\apache-ant-1.7.1

2- Also in the PATH env variable, you can see, the path to ant is:
C:\installations\apache-ant-1.7.1\bin

3- I also ran ant -diagnostics and the output is below after the output
to SET

------------------------------------------------------------------------
N:\tasks\ant task for juliet>SET
ALLUSERSPROFILE=C:\Documents and Settings\All Users
ANT_HOME=C:\installations\apache-ant-1.7.1
APPDATA=C:\Documents and Settings\bbnt752\Application Data
CLASSPATH=C:\Program
Files\Documentum\dctm.jar;C:\Documentum\config;C:\Program F
iles\Documentum\java\1.4.2_11\bin;
C:\installations\apache-ant-1.7.1\lib\ant.jar

CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=KEAUK05169
ComSpec=C:\WINNT\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=N:
HOMEPATH=\
HOMESHARE=\\LONFILE307\HOME$\bbnt752
JAD_HOME=C:\jadnt158
JAVA_HOME=C:\j2sdk1.4.2_13
LOGONSERVER=\\LONDCGC301
NUMBER_OF_PROCESSORS=2
OS=Windows_NT
Path=C:\Program
Files\Documentum\Shared;c:\Oracle\Ora920\bin;C:\Oracle\Ora817\bi
n;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program
Files\Business Ob
jects\common\3.5\bin\NOTES\DATA;C:\Program Files\Business
Objects\common\3.5\bin
\NOTES;C:\Program Files\Windows
Imaging\;C:\j2sdk1.4.2_13\bin;C:\jadnt158;C:\Pro
gram Files\CollabNet Subversion Server;C:\Program
Files\TortoiseSVN\bin;C:\insta
llations\apache-ant-1.7.1\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 3, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0403
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINNT
TEMP=C:\TEMP
TMP=C:\TEMP
TOMCAT_HOME=C:\tomcat5.0.28
UATDATA=C:\WINNT\system32\CCM\UATData\D9F8C395-CAB8-491d-B8AC-179A1FE1BE
77
USERDNSDOMAIN=CORP.KBR.COM
USERDOMAIN=HALHOUSTON
USERNAME=bbnt752
USERPROFILE=C:\Documents and Settings\bbnt752
windir=C:\WINNT

------------------------------------------------------------------------
----



N:\tasks\ant task for juliet>ant -diagnostics
------- Ant diagnostics report -------
Apache Ant version 1.6.2 compiled on July 16 2004

-------------------------------------------
 Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks     : 1.6.2
optional tasks : not available

-------------------------------------------
 ANT_HOME/lib jar listing
-------------------------------------------
ant.home: C:\installations\apache-ant-1.7.1
ant-antlr.jar (5752 bytes)
ant-apache-bcel.jar (8611 bytes)
ant-apache-bsf.jar (3939 bytes)
ant-apache-log4j.jar (3056 bytes)
ant-apache-oro.jar (39627 bytes)
ant-apache-regexp.jar (3762 bytes)
ant-apache-resolver.jar (4071 bytes)
ant-commons-logging.jar (3910 bytes)
ant-commons-net.jar (47026 bytes)
ant-jai.jar (21348 bytes)
ant-javamail.jar (6998 bytes)
ant-jdepend.jar (8132 bytes)
ant-jmf.jar (6593 bytes)
ant-jsch.jar (30797 bytes)
ant-junit.jar (93518 bytes)
ant-launcher.jar (12143 bytes)
ant-netrexx.jar (9881 bytes)
ant-nodeps.jar (431580 bytes)
ant-starteam.jar (35355 bytes)
ant-stylebook.jar (2330 bytes)
ant-swing.jar (6738 bytes)
ant-testutil.jar (14941 bytes)
ant-trax.jar (6881 bytes)
ant-weblogic.jar (14205 bytes)
ant.jar (1323005 bytes)
xercesImpl.jar (1223877 bytes)
xml-apis.jar (194354 bytes)

-------------------------------------------
 Tasks availability
-------------------------------------------
importtypelib : Initialization error
image : Missing dependency javax.media.jai.PlanarImage
sshexec : Missing dependency com.jcraft.jsch.UserInfo
replaceregexp : Initialization error
test : Not Available
icontract : Not Available
scp : Missing dependency com.jcraft.jsch.UserInfo
translate : Initialization error
vajload : Not Available
WsdlToDotnet : Initialization error
jpcovmerge : Not Available
cvsversion : Not Available
ildasm : Initialization error
maudit : Not Available
antlr : Initialization error
ftp : Initialization error
jpcovreport : Not Available
xmlvalidate : Initialization error
cab : Initialization error
jdepend : Missing dependency jdepend.xmlui.JDepend
symlink : Initialization error
mmetrics : Not Available
junit : Initialization error
vajexport : Not Available
N:\tasks\ant task for juliet>ant -version
Apache Ant version 1.6.2 compiled on July 16 2004




-----Original Message-----
From: Mike Stewart [mailto:MStewart@mgtplc.com] 
Sent: 01 December 2008 11:42
To: Ant Users List
Subject: Re: ANT failing from command line

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" <Am...@kbr.com> 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: user-unsubscribe@ant.apache.org 
For additional commands, e-mail: user-help@ant.apache.org 


-- 
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: ANT failing from command line

Posted by Greg Roodt <gr...@gmail.com>.
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 <MS...@mgtplc.com> 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" <Am...@kbr.com> 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: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
> --
> 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: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Re: ANT failing from command line

Posted by Mike Stewart <MS...@mgtplc.com>.
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" <Am...@kbr.com> 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: user-unsubscribe@ant.apache.org 
For additional commands, e-mail: user-help@ant.apache.org 


-- 
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: ANT failing from command line

Posted by "Rebhan, Gilbert" <Gi...@huk-coburg.de>.


-----Original Message-----
From: Ammar Khalid [mailto:Ammar.Khalid@kbr.com]
Sent: Monday, December 01, 2008 12:35 PM
To: user@ant.apache.org
Subject: ANT failing from command line

/*
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:
...

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:
*/

Eclipse ships with its own builtin Ant version.
As your ${ant.version} says 1.6.2, i assume you're using Eclipse
version 3.2, right ?

To make eclipse use another ant version, you have to change the Ant Home Entries via
Window | Preferences | Ant | Runtime | Ant Home Entries

Regards, Gilbert






---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org