ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rüegsegger Martin <martin.rueegseg...@visana.ch>
Subject AW: Call Ant task from java file
Date Fri, 12 Aug 2005 13:49:32 GMT
Hi Steffen 

"First question: What am I doing wrong?"

You didn't specify, what's going wrong, when you run your code. 
I recommend writing an Ant task first and then use it outside of a build.xml instead of 
using ant classes directly. Here's an example:

...
Project project = new Project(); 
project.init(); 
Target target = new Target(); 
ReorganizeAntTask rat   = new ReorganizeAntTask(); 
rat.setProject(project); 
rat.setOwningTarget(target); 
rat.execute(); 
...

Maybe you code fails only because of the missing dummy target object.

Regards,
Martin

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


Mime
View raw message