//richinternet.blog

Viewing By Entry / Main
Friday, March 24, 2006
Running Flex Builder's incremental compiler from ANT

If you're using ANT inside Flex Builder 2 to compile your Flex 2/AS3 application you've probably noticed that invoking mxmlc from inside ANT is not as fast as running the integrated compiler - even if incremental is set to true. This is because mxmlc gets loaded and initialized every time you build whereas the internal builder stays in the VM.

Fortunately, the builder used in Flex Builder 2 extends the core IncrementalProjectBuilder class and Eclipse contributes its own ANT task to invoke it. So if you're using ANT inside Eclipse simply use the <eclipse.incrementalBuild /> task to invoke the internal Flex 2 compiler. You should see same compilation times as running it by hand. The only thing you have to do is to tell ANT to run in the same VM as Eclipse, otherwise it won't now about the Workspace (Run --> External Tools... --> Ant build --> your build file --> JRE --> check "Run in the same VM as the Workspace")

A basic ANT file to invoke the incremental build process in the current workspace is:


<?xml version="1.0"?>
<project name="project" default="build">
<target name="build">
<eclipse.incrementalBuild />
</target>
</project>

to invoke the builder for a given project it's:


<eclipse.incrementalBuild project="MyProject" />

Of course, this is not Flex 2 specific, it works for all projects that use incremental project builders.

Dirk.

Comments

There are no comments for this entry.



Sun Mon Tue Wed Thu Fri Sat
   1234
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

About this blog
www.aws-blog.de
www.richinternet.de
www.flexforum.de
www.die-flexperten.de

AIR (10)
Apollo (3)
BlazeDS (8)
Breeze (1)
Central (5)
Cocoon P2P (1)
ColdFusion (55)
Flash (61)
Flash Media Server (8)
Flex (170)
Flex Trace Panel (6)
FXUG (3)
J2Flex (4)
MAX (31)
Mobile (1)
mxmlc (1)
Other topics (47)
Plugins (9)
Video (7)


Recent Flex Technotes
Recent ColdFusion Technotes
Recent Flash Technotes

http://www.aws-blog.de
http://www.die-flexperten.de
http://www.flexforum.de
http://www.flex.org

Aggregated by fullasagoog.com
Aggregated by MXNA

Short Mode | Full Mode

Herrlich & Ramuschkat