Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » ANT Run
ANT Run [message #778291] Thu, 12 January 2012 02:47 Go to next message
Pascal Bruckert is currently offline Pascal Bruckert
Messages: 2
Registered: January 2012
Junior Member
Is it possible to run a command on the commandline before and after running the ant-file?
I need that to make some little changes in the file system, but don't want to write this in the build-file.

THX
Pascal
Re: ANT Run [message #778295 is a reply to message #778291] Thu, 12 January 2012 03:10 Go to previous messageGo to next message
Satyam Kandula is currently offline Satyam Kandula
Messages: 444
Registered: July 2009
Senior Member
You can create a program launch configuration. Look at http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-exttools-running.htm
Re: ANT Run [message #778299 is a reply to message #778295] Thu, 12 January 2012 03:15 Go to previous messageGo to next message
Pascal Bruckert is currently offline Pascal Bruckert
Messages: 2
Registered: January 2012
Junior Member
I also thinked about that.
But then i can not use the ant run from eclipse.
Or is it possible to start the external launch config before the ant run?
Re: ANT Run [message #778303 is a reply to message #778299] Thu, 12 January 2012 03:57 Go to previous messageGo to next message
Satyam Kandula is currently offline Satyam Kandula
Messages: 444
Registered: July 2009
Senior Member
OK. I understand now. You could have a wrapper ant file which calls the command line before executing your original ant file.
Re: ANT Run [message #778382 is a reply to message #778291] Thu, 12 January 2012 11:56 Go to previous message
Michael Rennie is currently offline Michael Rennie
Messages: 65
Registered: July 2009
Location: Canada
Member
> Or is it possible to start the external launch config before the ant run?

It is, but you would have to manually launch them, there is no automated way to do this.

There are some options:

1)
You could create a shell script / bat file that performs the command line action / calls ant / performs command line action and call that (the shell script / bat file) as an external tool within Eclipse

2)
As Satyam mentioned you could create a build file that performs the command line actions and include your other build file in that one - that way you don't have to add file system ops to your original build file. See http://ant.apache.org/manual/Tasks/include.html for more info about including build files
Previous Topic:skip over CGLIB (and other) proxy code at Step Into in debugger
Next Topic:Eclipse newbie can't execute Java library
Goto Forum:
  


Current Time: Mon Apr 21 00:44:20 EDT 2014

Powered by FUDForum. Page generated in 0.03064 seconds