ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ajay Gautam <>
Subject Eclipse / ant can't find jar file
Date Thu, 03 Apr 2003 03:47:00 GMT

Yesterday, I downloaded and installed Eclipse 2.1 GTK on Gentoo Linux.

I have a CVS repository, which I can connect to and see from the CVS 
view in eclipse. I did "Checkout as Project" on a project, right clicked 
on build.xml and ran the "compile" target. Ant failed:

[javac] /home/agautam/workspace/JmsTcpAdapter/source/ 
package org.apache.log4j does not exist
[javac] import org.apache.log4j.*;
[javac] ^
and a ton of related errors.

Then, I went to the /tmp directory, and:
$ cvs co JmsTcpAdapter
$ cd JmsTcpAdaper
$ ant

which was successful.

I went back to eclipse, deleted the project, to be on the safe side, and 
re-checkedout the project and did a build again. Again same error. Looks 
like ant is unable to locate the log4j jar file in the lib directory, 
which I verified exists. Here are a few relevant lines from my build.xml:

	<property name="src" location="source"/>
	<property name="build" location="classes"/>
	<target name="init">
		<mkdir dir="${build}"/>
	<path id="project.class.path">
		<pathelement path="${classpath}"/>
		<pathelement location="${build}"/>
		<fileset dir="lib">
			<include name="**/*.jar"/>
		<fileset dir="jbosslib">
			<include name="**/*.jar"/>
	<target name="compile" depends="init">
		<javac srcdir="${src}" destdir="${build}">
			<classpath refid="project.class.path"/>

Another strange thing I found was that even from the command line,
$ cd ~/workspace/JmsTcpAdapter
$ ant

fails with the same errors. "cvs diff" does not show anything, and
"cvs up" does not bring anything new.

Any help in getting this project to work in eclipse will be really 

This is my first time I am trying out eclipse, and it really looks 
promising. Thanks for the excellent product guys...

Ajay Gautam

View raw message