Running Ant From Eclipse
We can run Ant targets from build.xml files from within Eclipse, but there's a little setup you have to do.
Create a new Simple Project (not a Java Project), I call mine "ANT_ProjectName".
- Right click on the Ant project and select New > File
- Click the Advanced button
- Select the option Link to file in the filesystem
- Browse for the build.xml file, if you expanaded to c:\alfresco you need to browse to c:\alfresco\common, select build.xml and press the Open button
- Enter build.xml in the File name field.
- Click Finish
You should now see a link to build.xml in your Ant project. Double-click the file to see the contents. Eclipse also has several options to allow you to run targets in the file.
One way is to use the 'Outline' window as it shows you all the targets in the project. Find the target you want to run and right click. Choose Run As > Ant build.
If you really want to you can also debug the Ant script by placing a breakpoint in build.xml and choosing Debug As > Ant Build.
Post a Comment