LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-31-2007, 10:44 PM   #1
newtonviet
LQ Newbie
 
Registered: Feb 2007
Posts: 5

Rep: Reputation: 0
Question How to Install and Config Ant for Centos 4.4 ?


I need to install Ant for my Centos 4.4. There is an instruction to do it by using jpackage and I have tried but it did not work,i.e. it shows error when I use ANT.

When I run # ant-disgnostics, the log is below. Could somebody let me know how to configure this Ant to work with Centos 4.4? Thanks!

> ant -diagnostics

/usr/bin/build-classpath: error: Could not find xml-commons-apis Java extension for this JVM
/usr/bin/build-classpath: error: Some specified jars were not found
------- Ant diagnostics report -------
Apache Ant version 1.6.5 compiled on February 9 2007

-------------------------------------------
Implementation Version (JDK1.2+ only)
-------------------------------------------
core tasks : 1.6.5
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
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 : UTF-8
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 : UTF-8
java.specification.version : 1.5
user.name : root
java.class.path : /usr/share/java/ant.jar:/usr/share/java/ant-launcher.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/share/ant/lib/ant-jsch.jar:/usr/share/ant/lib/ant-jai.jar:/usr/share/ant/lib/ant.jar:/usr/share/ant/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/xml-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/share/ant/lib/ant-vaj.jar:/usr/share/ant/lib/ant-apache-resolver.jar:/usr/share/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/ant/lib/ant-apache-regexp.jar:/usr/share/ant/lib/ant-apache-oro.jar:/usr/share/ant/lib/ant-netrexx.jar:/usr/share/ant/lib/ant-junit.jar:/usr/share/ant/lib/ant-apache-bsf.jar:/usr/share/ant/lib/ant-xalan1.jar:/usr/share/ant/lib/ant-trax.jar:/usr/share/ant/lib/ant-antlr.jar:/usr/java/jdk1.5.0_09/lib/tools.jar
java.vm.specification.version : 1.0
sun.arch.data.model : 32
java.home : /usr/java/jdk1.5.0_09/jre
java.specification.vendor : Sun Microsystems Inc.
user.language : en
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/jsse.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.cpu.endian : little
sun.io.unicode.encoding : UnicodeLittle
sun.desktop : gnome
sun.cpu.isalist :

Last edited by newtonviet; 04-02-2007 at 03:51 AM.
 
Old 04-02-2007, 09:37 PM   #2
newtonviet
LQ Newbie
 
Registered: Feb 2007
Posts: 5

Original Poster
Rep: Reputation: 0
I solved this problem. The cause: xml-commons-apis.jar should be in /usr/share/java/ but it wasn't installed despite a successful jdk install.

I re-installed as follows.

[root@server ~]# yum install xml-commons
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package xml-commons.noarch 0:1.3.03-7jpp set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
xml-commons noarch 1.3.03-7jpp jpackage 17 - generic 9.0 k

Transaction Summary
=============================================================================
Install 0 Package(s)
Update 1 Package(s)
Remove 0 Package(s)
Total download size: 9.0 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): xml-commons-1.3.03 100% |=========================| 9.0 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : xml-commons ######################### [1/2]
Cleanup : xml-commons ######################### [2/2]

Updated: xml-commons.noarch 0:1.3.03-7jpp
Complete!
[root@server ~]# rpm -ivh http://mirrors.dotsrc.org/jpackage/1...jpp.noarch.rpm
Retrieving http://mirrors.dotsrc.org/jpackage/1...jpp.noarch.rpm
Preparing... ########################################### [100%]
1:xml-commons-jaxp-1.3-ap########################################### [100%]
[root@server ~]# ant -version
Apache Ant version 1.6.5 compiled on February 9 2007

No more error
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use "ant" from J2EE SDK instead of installed ant in Fedora ? pcuongx Linux - Server 2 02-27-2007 05:45 AM
CentOS crashes on install! Richtown Linux - Newbie 3 11-10-2006 09:31 AM
Why? CentOS Install Richtown Linux - Newbie 2 11-02-2006 04:30 PM
Samba config on CentOS 4.3 Yig Linux - Networking 3 06-06-2006 01:00 PM
Help install CentOS Nodda4me Linux - Software 2 10-07-2005 06:11 AM


All times are GMT -5. The time now is 08:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration