ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bertrand lancelot" <blance...@partner.auchan.com>
Subject Call Ant within my java application
Date Thu, 24 Jun 2004 15:16:59 GMT
Hi all,

I need to call ANT within my Java application.

first, I tried to execute the class "org.apache.tools.ant.Main" with
properties from my application. After ANT starts, the JVM breaks with
System.exit usage. As a result my application shutdown too!

So, I would like to extend the Main class and override the method :
	public void startAnt(String[] args, Properties additionalUserProperties,
ClassLoader coreLoader)

Problem :
This method "startAnt" uses "processArgs", "handleLogfile", "printMessage",
"runBuild" methods and the attribute "definedProps" which are "private".

Question :
Is it possible to change the modifier of theses methods from "private" to
"protected final", and to declare a getter for "definedProps" field ?

Unfortunetly, to resolv this I'd have to copy all source from Main.java in
my project without System.exit usage.

In the case where this usage is not correct, please say it to me and give me
the best practice for this situation.
;o)

Sincerly,
	Bertrand,


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


Mime
View raw message