Cairngen Ant Tasks 1.2 Release

I have updated Cairngen to version 1.2 which introduces complete support for all Cairngorm 2+ releases as well as additional features to further improve usability.

If you are not familiar with Cairngen, it is an Ant based code generation tool for Adobe Cairngorm which allows developers to create Cairngorm project directories and classes from Flex Builder.

This latest release of Cairngen includes a few new features which have been added in addition to the original Cairngen 1.0 release which was published last week.

Below is a list of new features available in Cairngen 1.2:

  • Complete support for Cairngorm 2.0
  • Complete support for Cairngorm 2.1
  • Complete support for Cairngorm 2.2
  • Added logging capabilities for all targets
  • Abstracted user / project specific properties. User properties are now located in the project.properties file.

If you are using Flex builder as an Eclipse plugin, follow these steps to set up automatic project refreshes when using Cairngen: Select Run > External Tools > External Tools; select the build file then select the refresh tab and check the “refresh resources upon completion” checkbox. This will force a refresh everytime classes are generated to your project from Cairngen.

Download Cairngen 1.2

{ 16 comments to read ... please submit one more! }

  1. I found a small error in your build.xml file. Your create-sequence-exclude-delegate log the incorrect log.sequence.

    ${log.sequence.include.delegate.message}

  2. Good find, just fixed it.

    Thanks,
    Eric

  3. Eric, I can’t get it working ๐Ÿ™‚ I followed the steps above, but no go.

    I am using Flex builder 2 as standalone. When I rightclick the build.xml, i don’t get a “run as..” option. It’s greyed out. I also don’t have the windows > views > other > ant ๐Ÿ™

    Any ideas?

    Tx in advance, Ben

  4. Hey Ben,

    Cairngen 1.2 was developed for Eclipse but can also be used just as easily in the standalone Flex Builder, which is essentially installed on top of Eclipse.

    To use Cairngen in FlexBuilder is very easy. Simply open the build.xml file in Flexbuilder, in the Outline Panel (Window > show view > outline) select a target to execute and right+click run as > Ant Build – Thats it, no need to run from the command line at all.

    That should get you started. I will add this to the release notes as well.

    Enjoy,
    Eric

  5. Tx for the reply Eric.

    I tried what you mentioned, but didn’t do the trick. What I see is a plain text formatted xml file, and an empty outline panel saying “an outline is not available”. I’m going to check if it is the flex builder install which is giving problems, by doing the same on a different machine. WIll get back with more if it has better results.

    grt, Ben

  6. Bjorn Schultheiss

    Love it..

    Thanks Eric

  7. Eric – very cool. I do have one question – what is the purpose of the SERVICE constant in Services.mxml?

    Regarding Ben’s questions: I was having similar issues till I remembered that I had not yet installed Ant support in my new laptop. Peter Elst has a good step-by-step here: http://www.peterelst.com/blog/2006/09/03/flex-builder-2-ant-support/

  8. Hey Jim,

    The SERVICE constant is defined simply as an added setup constant.

    Typically all services in a ServiceLocator have an associated constant which is the same as the id of a service object (e.g: HTTPService id=”service”… , public static const SERVICE:string = “service”).

  9. Hi Eric,
    I am using FlexBuilder 2 standalone and ran into the same problem as Ben.

    1. I set Workspace to :C:\dev\adobe\cairngen
    2. open the C:\dev\adobe\cairngen\build.xml
    But the “Run As” is “None Applicable”, any idea?

    Do you have a step by step waltkthrough with screen shots that I can follow?
    Thanks, Rich

  10. Hi Eric,

    Thx for the ant tasks: I just added a little interface for them with antform. If you want to integrate it Iร‚ยดll send you an email with the build files…

    thx and cheers,

    Christoph

  11. Hi Eric,

    Cairngen seems to be a great solution. Thank you for sharing it!

    I’d like to ask a question about it. Should I change the value of “sequence.name” every time I create an Event / Command / Delegate sequence with Cairngen or there is some other way to name the sequence files that are going to be generated?

    Thanks,
    Emanuil

  12. Hey Emanuil,

    To create a Sequence (i.e: Event / Command / Business Delegate) all you need to do is assign a new value to the sequence.name property. This is the name which is used by the Sequence.

    I plan to release an updated version of Cairngen soon which includes many, many new features which have been added by myself and several other contributors. One new addition is a promt which will ask the use to enter the name of the Sequnce so that you no longer have to modify the sequence.name property.

    – Eric

  13. hi eric when i try to run build.xml using ant i get following error
    17: Problems opening file using a recorder entry if u can plz guide me
    thanx

  14. Hi Eric,
    This seems to be just the thing to save me boring laborious creation time! I’m having the same issue as Raj. Build.xml:53 problems opening file using a recorder entry. I tried from the command line as well and got this error: Build.xml:373: Unable to load a script engine manager Any ideas? I know my ant/eclipse are all updated and build other projects just fine. Any help would be greatly appreciated.

{ 0 Pingbacks/Trackbacks }