ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ammar Khalid" <Ammar.Kha...@kbr.com>
Subject RE: ANT failing from command line
Date Mon, 01 Dec 2008 11:56:45 GMT
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" <Ammar.Khalid@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


Mime
View raw message