Reputation: 3947
Eclipse has that green arrow button we use to compile and execute projects.
I wanted to run extra scripts on it, like build a new jar file, or deploy a war file in an external Tomcat instance, delete the folder related to that war and restart Tomcat, or update a jar dependancy before compiling, or even deleting a property file so that it's not included on created jar.
I suppose Ant is able to do these stuff, but how I can attach before and after scripts to Eclipse?
Upvotes: 2
Views: 89
Reputation: 7243
Eclipse is nicelly integrated with Ant. Just put your build.xml
in your project, right click on it, select "Run as" and then "Ant Build".
Then the IDE will execute your script and sent the Output to the Console Tab. I'm currently using it to deploy applications to an external WebSphere Portal Server and it works smoothly.
Upvotes: 1
Reputation: 19767
Just execute an ant script doing this, use the black ant button instead of the green run button.
Upvotes: 1