ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bender, Christopher" <Christopher.Ben...@tdsecurities.com>
Subject Error finding class
Date Mon, 17 Nov 2003 14:38:47 GMT
HEy everyone,

When I call my buildfile from the command line, everything works fine.

When i call it through a java app I get the following exception

file:C:/path_to_file/file_name.xml:75: taskdef class com.pkg1.pkg2.ClassName cannot be found
	at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:240)
	at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:162)
	at org.apache.tools.ant.Task.perform(Task.java:341)



This is the code I am using to call the file


		Project project = new Project();
		project.init();
		
		File buildFile = new File(BuildFileLoc());

		//ResourceDir is where the build file is located
		project.setBaseDir(new File(ResourceDir()));
		
		ProjectHelper.configureProject(project, buildFile);
		
		project.setProperty("homeDir", getAppHome());
		project.setProperty("instanceName", getInstanceName());

		
		DMTBuildListener myListener = new DMTBuildListener();
		project.addBuildListener(myListener);
		
		project.executeTarget(target);



The file can be called and ran properly, except when I have a task def to the above java class.
 This class is found fine when ant is called by the command line.

I am using ANT 1.5.x


Thanks,
Chris

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


Mime
View raw message