Eclipse – Get project name within Ant script

We use Eclipse/FDT and we also use Ant scripts to build and run our flash projects, and an annoyance I haven’t been able to fix in the past year was the ability to know , within an Ant script, the Eclipse Project name from which a Ant script is launched.

After some time spent reading every single Ant tag on this earth I saw the “xmlproperty” tag which answered my prayers!

here is how I get the project name from the .project file

<xmlproperty file="../.project"/>
<fdt.startDebugger projectname="${projectDescription.name}" savelocation="bin"/>

xmlproperty loads an XML file and makes its elements accessible as variables in your Ant script.

This entry was posted in Flash, Tools. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.
  • Alex

    woohoo! thanks man, I googled the living s$# out of google for this

  • Anonymous

    You are welcome! :)

blog comments powered by Disqus