Deploy Flex with Apache Ant

50 %
50 %
Information about Deploy Flex with Apache Ant

Published on January 21, 2009

Author: dctrl



Speak by dCTRL at Swiss Flash User Group Meeting from 20.01.2009

Deploy Flex with Apache Ant Swiss Flash User Group (sfug) Zürich | 20. Januar 2009

Hello my name is Andreas Lorenz dctrl - interactive media gmbh

1 Ant Overview The basics

Without Ant

With Ant

What is Ant? 1. An XML based custom build tool 2. Open source & well documented 3. Standardized & widely used 4. Implemented in Java 5. Platform independent

Ant Goals Create a continuous integration based build process: • Centralized • Automated • Self-Testing

Usage 1. Don‘t do work you‘ve already done 2. Do alot of tasks once 3. Prevent Mistakes

What Ant can do 1. Build swf 2. Do UnitTest‘s 3. Generate ASDoc‘s & SWC Files 4. Build template files 5. Combine Flex projects, modules, assets 6. Copy, zip, ftp, svn 7. Source distribution

2 Ant Basics Creating Issues

Installing Ant 1. 2. Bundled with IDE‘s like Eclipse

Directory structure / project / ant / build / dist / html-template / src

3 Ant Structure Creating Issues

Files 1. Build file «build.xml» 2. Main property file «» 3. Local property file «» 1. Separate data from the process 2. Configuration file 3. Re-usability 4. Not under SVN Referenced by ${var} # default pathes main.path = dctrl/project src.path = ${ main.path}/ src

build.xml 1. One «build.xml» file per project 2. Each build use targets 3. Each target use tasks 4. Each task has properties

build.xml structure Example: <project name=quot;examplequot; default=quot;helloquot; basedir=quot;.quot;> <property name=quot;string.varquot; value=quot;Hello Worldquot;/> <target name=quot;helloquot;> <echo message=quot;${string.var}quot; /> </target> </project>

Build output

<project> Root element 4 attributes: 1. name - projectname (optional) 2. basedir - reference (optional) 3. default - target (required) 4. description - info (optional)

<project> Example: <project name=”hello” default=”main” basedir=”.” description=“standard build“>

<property> 1. User defined variables 2. Case sensitive 3. Defined in build.xml or 4. Reference by ${var} 5. System properties ${} 6. Built-in properties ${}

<property> Example: <property file=quot;build.propertiesquot; /> <property name=quot;compile.debugquot; value=quot;truequot;/> <echo>The main path is ${ main.path }</echo> <echo>The debug state is ${ compile.debug }</echo>

<target> 1. A <project> has one or more <target> 2. Wrapper for a sequences of actions (tasks) 3. Can depend on other <target> 4. Executes only once

<target> 5 attributes: 1. name - target reference 2. depends - other targets (optional) 3. if - conditional (optional) 4. unless - converse of if (optional) 5. description - info (optional)

<target> Example: <target name=quot;jarquot; depends=quot;compilequot; description=quot;create a Jar file for the applicationquot;> <target name=quot;jarquot; if=quot;gui_readyquot;> <target name=quot;jarquot; unless=quot;gui_readyquot;>

<task> 1. Ant built-in Java commands (tasks) 2. Additional tasks like flexTasks (JAR files) 3. Custom Java commands 4. Independent executed code 5. Wrapped in a <target> 6. Can have multiple attributes

<task> Example: <target name=quot;compilequot; depends=quot;initquot;> <!- - Compile the java code - -> <javac srcdir=quot;${src}quot; destdir=quot;${build}quot;/> </target>

<task> Ant built-in tasks: Ant Exec GZip Replace Unzip AntCall ExecOn Jar Style Zip Available Fail Mail Tar Copy Filter Mkdir Taskdef Delete Get Move Touch Echo GUnzip Property Tstamp

<task> Optional tasks (must install JAR files): FTP SVN Mail FlexTasks

Events Ant generates events as it executes: 1. Build started/finished 2. Target Build started/finished 3. Task Build started/finished 4. Message logged

4 A Typical Project Examples

5 Some more infos before you start your own

Resources Homepage: User Manual: Wiki: FAQ: Books: Apache Ant Resources: Apache Ant 1.5 Manual: Flex Ant Tasks:

Thanks! ,

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

Apache Ant - Welcome

Apache Ant™ Apache Ant is a ... tool and dependency management can use Ant in combination with Apache Ivy. The Apache Ant project is part of the Apache ...
Read more

SFUG: Deploy Flex with Apache ANT - Technology

... Deploy Flex with Apache ANT. Embed size(px) start on. Link. Report Description. Text. 1.DeployFlex withApache AntSwiss Flash User Group (sfug)Zürich ...
Read more

ServerDeploy Task - Apache Ant

Apache Ant ServerDeploy User Manual. by. Christopher A. Longo ... This example shows the use of serverdeploy to deploy a component to a JOnAS server:
Read more

java - How Apache Ant deploys .war file to Tomcat - Stack ...

How Apache Ant deploys .war file to Tomcat. ... I'm using Apache Ant 1.8 to deploy a web application into a local Tomcat server, and the build.xml file ...
Read more

Using Flex Ant Tasks to build Flex projects – Part 1 ...

Using Flex Ant Tasks to build Flex projects ... My Projectsflex_ant_pt1_TasksDEPLOY ... to learn more about Ant and Flex. Download Ant from Apache ...
Read more

Building Flex applications with Maven - Apache Flex ...

Building Flex applications with Maven. ... These have nothing to do with Apache Flex, which is referenced using the groupId "org.apache.flex".
Read more

Apache Flex® - SDK Installer

The Apache Flex team is pleased to ... support installation via Apache Ant and it was determined that ... web applications that deploy ...
Read more

Maven Ant Tasks - Install and Deploy - Apache Maven

Apache > Maven > Maven Ant Tasks > Install and Deploy ... The following example shows basic use of the install and deploy tasks. ... Apache Maven, ...
Read more