Zach Carter wrote:
> On Tuesday 29 July 2008 10:37:03 am Lubos Kosco wrote:
>   
>> Hi Zach,
>>
>>
>> the key is to see what this classpath contains and whether it contains
>> ant.jar which we use to get appropriate classes ...
>>     
>
> There are many references to classpath and ant.jar in the build log.  
> Full log posted here:  http://www.zachcarter.com/ant.out
>
>   
>> (we also call a target somewhere up front to copy this ant.jar to ./lib )
>>     
>
> I did this step manually ahead of time, because of a tip I found somewhere 
> online:
>
> cp /usr/share/java/ant.jar <opengroksrc>/lib/ant.jar
>
> This is interesting:
>
>     [javac] org/opensolaris/opengrok/web/Util.java added as 
> org/opensolaris/opengrok/web/Util.class doesn't exist.
>     [javac] org/opensolaris/opengrok/web/WebappListener.java added as 
> org/opensolaris/opengrok/web/WebappListener.class doesn't exist.
>     [javac] org/opensolaris/opengrok/web/raw.java added as 
> org/opensolaris/opengrok/web/raw.class doesn't exist.
>     [javac] Compiling 154 source files to 
> /data/opengrok/opengrok-dev/build/classes
>     [javac] Using modern compiler
> dropping /usr/share/ant/lib/ant.jar from path as it doesn't exist
>     [javac] Compilation arguments:
>     [javac] '-deprecation'
>     [javac] '-d'
>     [javac] '/data/opengrok/opengrok-dev/build/classes'
>     [javac] '-classpath'
>
> The ant.jar file is in fact a symlink.  Could this be a clue?:
>   

Not really, all Linux distros use this "trick" to have all jars in 
/usr/share/java so they can be shared as C libraries are shared ( .so in 
/lib)

Also you might try using ant 1.7 (although it seems Centos doesn't have 
this package)

opengrok is trying to copy ant.jar from $ant.home/lib/ant.jar ... it 
seems your distro doesn't have this like that ...
(don't want to get religious, but OpenSolaris and Debian have it like 
that ;) )

It seems that ant package for CentOs is not following the directory 
structure of apache ant
(It seems to deliver /usr/share/ant/lib/  directory though ... it seems 
empty ... it should have had a symlink to latest ant.jar ... seems like 
Centos packaging is not that great :( )

so all in all make a symlink
ln -s /usr/share/java/ant-1.6.5.jar /usr/share/ant/lib/ant.jar
(you might report this to  CentOs developers and show them  e.g. this: 
http://packages.debian.org/etch/all/ant/filelist )

and your build will work

hth
L

P.S. (warning: the next statement is strongly imho) frankly the only 
professional and enterprise worthwhile version of Linux is Debian ... 
believe it or not, if you understand it, you'll see its power over any 
other Linux distro (I still wonder how RedHat is surviving ... seems 
that people don't recognize quality SW and only believe marketing or 
promises)


> [root at smee opengrok-dev]# ls -lad /usr/share/java/ant.jar 
> lrwxrwxrwx 1 root root 13 Jul 21 04:02 /usr/share/java/ant.jar -> 
> ant-1.6.5.jar
> [root at smee opengrok-dev]# ls -ald lib/ant.jar
> -rw-r--r-- 1 root root 1033865 Jul 29 10:14 lib/ant.jar
> [root at smee opengrok-dev]# diff /usr/share/java/ant-1.6.5.jar lib/ant.jar
> [root at smee opengrok-dev]# 
>
>   


Reply via email to