Skip to content


Flex Ant Tasks and FlexFileSet error

*This is more of a post-reminder or a google-search aha than a soliloquy on the joys of FlexTasks and how to use them. If you want to know more about flextasks, visit here, or Ryan Taylor’s blog for some good tips, or pick up this wonderful book… the holidays are coming.

I have had the fortunate opportunity to work with Andy Zupko on a project here at Infrared5. We have our good days and our bad days – as most projects go – and hopefully we’ll be able to showcase our efforts at some time. Recently i started whipping the project into shape to handle modules, rsls and loaded styles to minimize the download time and highten user experience. Why does it always come down to the last few days to get this up and running? I don’t know. Maybe we’re so gung-ho to get things finished for an iteration and to show a client that deployment structure falls a little to the wayside. In any event Andy, and in some part me i suppose, structured the project to have minimal impact when it came time to have a deployment routine and manage runtime styles and rsls. Enough horn-tooting! What am i talking about?

Well, when it came time to set up the ant tasks that will take over the deployment and distribution of the application i was hitting a wall in compiling against an rsl. More to the point, i was getting this error:

BUILD FAILED : No directory specified for FlexFileSet.

… when combined with this directive

<compiler .external-library-path>
	<include name="${app.dir}/${rsl.name}.swc" />
</compiler>

I’m not gonna go into the nuts and bolts of the build file or even attempt to explain what that error means. I am familiar with compiling applications and modules from the Terminal and pretty much love doing most things from the terminal rather than relying on tools in eclipse, but i thought to bring experience down to a playing ground for a project that will be handed off to a client at some point, go with flex ant tasks. It’s well documented. Google finds most answers. Etc. But there are subtle changes to syntax that i am unfamiliar with when it comes to create a build file targeting the command line tools of the SDK.

In any event, it baffled me why this command would not work. It syntactically looked correct to me. The compiler directive is spelled correctly, the option variable is the correct path… wtf. Well just like the -library-path option i suppose you had to remove the directory that the SWC lives in from the variable and add it as a dir property.

<compiler .external-library-path dir="${app.dir}">
	<include name="${rsl.name}.swc" />
</compiler>

Works! All is fine… but it took a hell of a long time to figure that out. Thought i would post this for any Terminal monkeys out there that run across this issue when building an ant file for compiling rsls into your application.

Was I bone-head for 2 hours? Probably…. feel free to leave a comment.

[Update February 3rd, 2009]Ryan Taylor sent a solution that he uses (after being welcomed by my wordpress comments failure), which i find pretty elegant and will use in the future.

<mxmlc ...>
       <runtime -shared-library-path path-element="${libs}/MyLibrary.swc">
           <url rsl-url="MyLibrary.swf" />
           <url policy-file-url="" />
    </runtime>
</mxmlc>

Thanks, Ryan!

Posted in Flash, Flex, FlexTasks.


9 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Ryan Taylor says

    Here is a simple example of what I usually do for RSLs:

    In the case of the Flex framework, you just do the ‘url’ nodes twice; one for the .swz and one for the .swf (fail safe in case the user’s installed FP version doesn’t support framework caching).

  2. Ryan Taylor says

    Haha, or not… Doesn’t look like it wants to render code properly. I guess just ping me over email or IM if you are interested.

  3. Kinder says

    А мне нравится этот блог, только авторам надо помнить , что посетители разные бывают. Короче учитывайте возростной ценс посетителей.

  4. Volshebnick says

    Отлично, сделали блог, ничего не скажешь против.

  5. Relaxxxni says

    Нашел много интересного в этом блоге, очень доволен.

  6. Ulitka says

    Оболденно ты придумал, главное что все элементарно.

  7. Mobies says

    Добавлю в закладки тогда, тематика то что нужно.

Continuing the Discussion

  1. google search tips | Digg hot tags linked to this post on December 11, 2008

    [...] t. Category: Internet Explorer … 12votes Vote Flex Ant Tasks and FlexFileSet error *This is more of a post-reminder or a goo [...]

  2. google books library catalog | Digg hot tags linked to this post on December 12, 2008

    [...] lets you choose which messages … 12votes Vote Flex Ant Tasks and FlexFileSet error *This is more of a post-reminder or a goo [...]



Some HTML is OK

or, reply to this post via trackback.