Activating Missing Ant Plugin in PDT Eclipse

ant-with-eclipse-header

Did you ever wonder why there is no Ant support in your Eclipse installation?

If you are working with Eclipse as your standard IDE for PHP Projects you will probably use the PDT Eclipse environment which doesn’t include much of the Java project tools. Ant is one of the very handy ones.


What is Ant?

With Ant you can write simple and as well sophisticated batch jobs for compiling and deploying your code or any other task you could think of. For an example, I’m using Ant to compress and obfuscate my Javascript and CSS files.


How does it work?

Tasks you would like to be processed with Ant you put in a build.xml file.
Here is a simple example:

 
     Files foo.txt and bar.txt are present.
 

 
     
         
             
             
         
     
 

To learn how to write your own build files checkout the Ant Manual.


Activating Ant in Eclipse

  1. In Eclipse go to Help -> Software Updates -> Available Software
  2. Select Java Development Tools and install it
  3. Restart Eclipse

Now you should be able to see Ant in your Eclipse Preferences and when you right-click on a build.xml file in your project you can run it via Run As -> Ant Build.


Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkArena
  • LinkedIn
  • MisterWong
  • MisterWong.DE
  • Netvibes
  • NewsVine
  • StumbleUpon
  • Technorati
  • Wykop
  • Yigg
  • BlinkList
  • email
  • MySpace
  • TwitThis

Previous & Next Post



2 Responses to “Activating Missing Ant Plugin in PDT Eclipse”

  1. Dmitry Sichev  on April 19th, 2010

    Excellent small guide!

    Thank You!
    Dmitry.

  2. ben  on June 12th, 2010

    It worked, but I had to search for the right package. Thanks!


Leave a Reply