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" <Ammar.Khalid@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 <Ammar.Khalid@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" <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
>
>
---------------------------------------------------------------------
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
|