Home > ANT > Ant for flash developers – Introduction I (part 1)

Ant for flash developers – Introduction I (part 1)

September 2nd, 2009 panaewa Leave a comment Go to comments

This article is intended as an introduction to ant, since it shows how to create the build.xml file to execution of the first target. Possibly it’s pretty basic, but as is my first post also serves as test me.

To carry out the following guide, you must have installed eclipse distribution I use the PDT, since most of the projects that I do are done in PHP, and is configured according to the manual I found in RBLAB, very good if not set never eclipse.

Eclipse 3.5 and FDT 3.2 for Actionscript development – Part 1 – Installation

Eclipse 3.5 and FDT 3.2 for Actionscript development – Part 2 – Additional plugins

Eclipse 3.5 and FDT 3.2 for Actionscript development – Part 3 – Configuration


1 .- Creation of a flash project.

Once you are all set and open FDT perspective, we create a new project from the File menu> New> New Flash Project, we receive the project creation wizard TDF, in my case I gave the name Ant Basic, window so that the projects must show the following:

Creation of a flash project

Creation of a flash project

2. Creating the build.xml file

The build.xml file is an xml file for a lifetime, so it’s as easy as going to File> New> Others, and in the window that appears we deploy the XML folder and select XML.

creating build.xml file

creating build.xml file

Click Next, and name it build.xml. and finally Finish, this will open the file created in the working environment.

I have also created a folder called build under the project, it’ll leave all the files to be used, such as property files, templates, and some library that will write later in the project.

So, the project window should appear as follows:

Project

Project

The build.xml file should have as a father the tag project, so the first thing to do is create this element.

<?xml version="1.0" encoding="UTF-8"?>
<project name="AntBasic" default="main" basedir=".">
</project>

Besides the attributes are defined name (AntBasic), which contains the name of the project and default, which defines the default target also have defined the path where the project base directory.

Now create the main target:

<?xml version="1.0" encoding="UTF-8"?>
<project name="AntBasic" default="main" basedir=".">
      <target name="main"/>
</project>

Once we have the build.xml file with a target set, we keep it.

In ANT panel, click the button to add build file, and select the file you have created

build file selection

build file selection

If all is OK, ANT panel should appear as follows:

Run target main

Run target main

To run the main target, double click on the target or press the right button on it and choose Run As> Ant Build or Ctrl + Enter if you have set up access, for those of us from flash this configuration will be very useful.

Categories: ANT Tags: ,
  1. September 16th, 2009 at 17:24 | #1

    Muy interesante el blog.

  1. No trackbacks yet.