[CentOS] How to Install and Configure Ant for Centos 4.4 ?

Sun Apr 1 05:17:41 UTC 2007
Haison Company <haisoncompany at gmail.com>

I need to install Ant for my Centos 4.4. First, I have followed this post to
install Java Jdk:
http://www.centos.org/modules/newbb/viewtopic.php?topic_id=2475
<http://www.centos.org/modules/newbb/viewtopic.php?topic_id=2475&forum=28>
&forum=28 and it worked. 

[root at server ~]# java -version
java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)

There is an instruction to do install ant by using jpackage and I have done.
But when I check, there is still this problem with Ant as in the log below.
Could somebody let me know how to configure this Ant to work with Centos
4.4? Thanks!

[root at server ~]# ant -version
/usr/bin/build-classpath: error: could not find xml-commons-apis Java
extension for this JVM
/usr/bin/build-classpath: error: All specified jars were not found
Apache Ant version 1.6.2 compiled on November 12 2004

When I run # ant-diagnostics, the log is below. 

> ant -diagnostics
/usr/bin/build-classpath: error: could not find xml-commons-apis Java
extension for this JVM
/usr/bin/build-classpath: error: All specified jars were not found
------- Ant diagnostics report -------
Apache Ant version 1.6.2 compiled on November 12 2004

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

-------------------------------------------
ANT_HOME/lib jar listing
-------------------------------------------
ant.home: /usr/share/ant
ant-jsch.jar (22726 bytes)
ant-jai.jar (21359 bytes)
ant.jar (1034049 bytes)
ant-javamail.jar (6761 bytes)
xercesImpl.jar (1010675 bytes)
ant-weblogic.jar (14363 bytes)
ant-stylebook.jar (2328 bytes)
xml-apis.jar (124724 bytes)
ant-xslp.jar (2244 bytes)
ant-swing.jar (6763 bytes)
ant-launcher.jar (9180 bytes)
ant-starteam.jar (35472 bytes)
ant-apache-log4j.jar (3022 bytes)
ant-nodeps.jar (421008 bytes)
ant-vaj.jar (49742 bytes)
ant-apache-resolver.jar (4082 bytes)
ant-apache-bcel.jar (8617 bytes)
ant-jdepend.jar (8160 bytes)
ant-icontract.jar (9721 bytes)
ant-commons-net.jar (35303 bytes)
ant-commons-logging.jar (3864 bytes)
ant-jmf.jar (6605 bytes)
ant-apache-regexp.jar (3724 bytes)
ant-apache-oro.jar (48034 bytes)
ant-netrexx.jar (9998 bytes)
ant-junit.jar (74237 bytes)
ant-apache-bsf.jar (12597 bytes)
ant-xalan1.jar (4465 bytes)
ant-trax.jar (68841 bytes)
ant-antlr.jar (5667 bytes)

-------------------------------------------
Tasks availability
-------------------------------------------
ccmkdir : Not Available
propertyfile : Not Available
importtypelib : Not Available
vsscheckin : Not Available
p4reopen : Not Available
image : Not Available
csc : Not Available
sshexec : Not Available
wlrun : Not Available
p4label : Not Available
p4revert : Not Available
replaceregexp : Not Available
jjtree : Not Available
jarlib-display : Not Available
jspc : Not Available
test : Not Available
vsshistory : Not Available
icontract : Not Available
p4submit : Not Available
scp : Not Available
ccmcheckin : Not Available
p4change : Not Available
p4delete : Not Available
vssadd : Not Available
p4integrate : Not Available
translate : Not Available
cclock : Not Available
chown : Not Available
vajload : Not Available
jarlib-available : Not Available
rexec : Not Available
WsdlToDotnet : Not Available
jpcovmerge : Not Available
cvsversion : Not Available
ejbjar : Not Available
stlist : Not Available
serverdeploy : Not Available
ildasm : Not Available
cccheckin : Not Available
ccunlock : Not Available
wljspc : Not Available
telnet : Not Available
sosget : Not Available
p4sync : Not Available
ccmklabel : Not Available
p4edit : Not Available
maudit : Not Available
antlr : Not Available
netrexxc : Not Available
ftp : Not Available
jpcovreport : Not Available
ccmcheckout : Not Available
xmlvalidate : Not Available
p4resolve : Not Available
ccmcheckintask : Not Available
iplanet-ejbc : Not Available
native2ascii : Not Available
ccrmtype : Not Available
starteam : Not Available
vsscheckout : Not Available
soscheckin : Not Available
mimemail : Not Available
stylebook : Not Available
stlabel : Not Available
cab : Not Available
splash : Not Available
ccmkbl : Not Available
cccheckout : Not Available
p4have : Not Available
jdepend : Not Available
jsharpc : Not Available
symlink : Not Available
script : Not Available
ccmcreatetask : Not Available
rpm : Not Available
attrib : Not Available
mmetrics : Not Available
echoproperties : Not Available
junit : Not Available
stcheckin : Not Available
chgrp : Not Available
vajexport : Not Available
stcheckout : Not Available
p4labelsync : Not Available
vsscreate : Not Available
ejbc : Not Available
vbc : Not Available
wsdltodotnet : Not Available
junitreport : Not Available
ccmkattr : Not Available
ccupdate : Not Available
renameext : Not Available
vsslabel : Not Available
vsscp : Not Available
vajimport : Not Available
p4fstat : Not Available
setproxy : Not Available
wlstop : Not Available
p4counter : Not Available
ilasm : Not Available
soscheckout : Not Available
jarlib-resolve : Not Available
ccuncheckout : Not Available
jlink : Not Available
javacc : Not Available
jarlib-manifest : Not Available
pvcs : Not Available
ccmklbtype : Not Available
sound : Not Available
scriptdef : Not Available
mparse : Not Available
blgenclient : Not Available
jjdoc : Not Available
ccmkelem : Not Available
javah : Not Available
ccmreconfigure : Not Available
p4add : Not Available
soslabel : Not Available
jpcoverage : Not Available
depend : Not Available
vssget : Not Available
ddcreator : Not Available

-------------------------------------------
org.apache.env.Which diagnostics
-------------------------------------------
Not available.
Download it at http://xml.apache.org/commons/

-------------------------------------------
XML Parser information
-------------------------------------------
XML Parser : org.apache.xerces.jaxp.SAXParserImpl
XML Parser Location: /usr/share/java/xerces-j2-2.7.1.jar

-------------------------------------------
System properties
-------------------------------------------
java.runtime.name : Java(TM) 2 Runtime Environment, Standard Edition
sun.boot.library.path : /usr/java/jdk1.5.0_09/jre/lib/i386
java.vm.version : 1.5.0_09-b03
ant.library.dir : /usr/share/ant/lib
java.vm.vendor : Sun Microsystems Inc.
java.vendor.url : http://java.sun.com/
path.separator : :
java.vm.name : Java HotSpot(TM) Client VM
file.encoding.pkg : sun.io
user.country : US
sun.os.patch.level : unknown
java.vm.specification.name : Java Virtual Machine Specification
user.dir : /root
java.runtime.version : 1.5.0_09-b03
java.awt.graphicsenv : sun.awt.X11GraphicsEnvironment
java.endorsed.dirs : /usr/java/jdk1.5.0_09/jre/lib/endorsed
os.arch : i386
java.io.tmpdir : /tmp
line.separator : 

java.vm.specification.vendor : Sun Microsystems Inc.
os.name : Linux
ant.home : /usr/share/ant
sun.jnu.encoding : ANSI_X3.4-1968
java.library.path :
/usr/java/jdk1.5.0_09/jre/lib/i386/client:/usr/java/jdk1.5.0_09/jre/lib/i386
:/usr/java/jdk1.5.0_09/jre/../lib/i386:
java.specification.name : Java Platform API Specification
java.class.version : 49.0
sun.management.compiler : HotSpot Client Compiler
os.version : 2.6.9-42.0.10.plus.c4
user.home : /root
user.timezone : 
java.awt.printerjob : sun.print.PSPrinterJob
file.encoding : ANSI_X3.4-1968
java.specification.version : 1.5
java.class.path :
/usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar:/usr/share/java/jax
p_parser_impl.jar:/usr/lib/jvm/java/lib/tools.jar:/usr/share/ant/lib/ant-jsc
h.jar:/usr/share/ant/lib/ant-jai.jar:/usr/share/ant/lib/ant.jar:/usr/share/a
nt/lib/ant-javamail.jar:/usr/share/ant/lib/xercesImpl.jar:/usr/share/ant/lib
/ant-weblogic.jar:/usr/share/ant/lib/ant-stylebook.jar:/usr/share/ant/lib/xm
l-apis.jar:/usr/share/ant/lib/ant-xslp.jar:/usr/share/ant/lib/ant-swing.jar:
/usr/share/ant/lib/ant-launcher.jar:/usr/share/ant/lib/ant-starteam.jar:/usr
/share/ant/lib/ant-apache-log4j.jar:/usr/share/ant/lib/ant-nodeps.jar:/usr/s
hare/ant/lib/ant-vaj.jar:/usr/share/ant/lib/ant-apache-resolver.jar:/usr/sha
re/ant/lib/ant-apache-bcel.jar:/usr/share/ant/lib/ant-jdepend.jar:/usr/share
/ant/lib/ant-icontract.jar:/usr/share/ant/lib/ant-commons-net.jar:/usr/share
/ant/lib/ant-commons-logging.jar:/usr/share/ant/lib/ant-jmf.jar:/usr/share/a
nt/lib/ant-apache-regexp.jar:/usr/share/ant/lib/ant-apache-oro.jar:/usr/shar
e/ant/lib/ant-netrexx.jar:/usr/share/ant/lib/ant-junit.jar:/usr/share/ant/li
b/ant-apache-bsf.jar:/usr/share/ant/lib/ant-xalan1.jar:/usr/share/ant/lib/an
t-trax.jar:/usr/share/ant/lib/ant-antlr.jar
user.name : root
java.vm.specification.version : 1.0
java.home : /usr/java/jdk1.5.0_09/jre
sun.arch.data.model : 32
user.language : en
java.specification.vendor : Sun Microsystems Inc.
java.vm.info : mixed mode, sharing
java.version : 1.5.0_09
java.ext.dirs : /usr/java/jdk1.5.0_09/jre/lib/ext
sun.boot.class.path :
/usr/java/jdk1.5.0_09/jre/lib/rt.jar:/usr/java/jdk1.5.0_09/jre/lib/i18n.jar:
/usr/java/jdk1.5.0_09/jre/lib/sunrsasign.jar:/usr/java/jdk1.5.0_09/jre/lib/j
sse.jar:/usr/java/jdk1.5.0_09/jre/lib/jce.jar:/usr/java/jdk1.5.0_09/jre/lib/
charsets.jar:/usr/java/jdk1.5.0_09/jre/classes
java.vendor : Sun Microsystems Inc.
file.separator : /
java.vendor.url.bug : http://java.sun.com/cgi-bin/bugreport.cgi
sun.io.unicode.encoding : UnicodeLittle
sun.cpu.endian : little
sun.cpu.isalist :

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20070401/160d8596/attachment-0004.html>