ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Caoilte O'Connor <li...@caoilte.org>
Subject java task and classpath problem
Date Tue, 11 Nov 2003 14:19:02 GMT
Hi,
I think I'm just getting very confused about basic classpath 
stuff. could anyone spare thirty seconds to tell me why the 
first of these works and the second fails.

		<java 
			classname="net.sportplan.dbunit.DBUnitUtils"
fork="true" dir="${build.dir}/dbunittest/classes">
			<classpath>
                <path refid="dbunittest.compile.classpath"/>
                <pathelement location="${build.dir}/
dbunittest/classes"/>
			</classpath>
		</java>

It's trying to execute the main() of an unjarred class file, 
but i can only get it to work if i fork the JVM. The below 
fails with a "not found on classpath error"

		<java 
			classname="net.sportplan.dbunit.DBUnitUtils">
			<classpath>
                <path refid="dbunittest.compile.classpath"/>
                <pathelement location="${build.dir}/
dbunittest/classes"/>
			</classpath>
		</java>

despite the fact that the pathelement bit should (i thought) 
include the directory below which are the net/sportplan/
dbunit/.... class files.

Is there anyway I can do this without forking?

Alternatively, if I jar that part of the tree (it's a load 
of separate database to xml transformations - ie lots of 
little applications) can I have more than one main in the 
manifest and specify it using ant?

cheers for any pointers,

c


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message