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
May 9th, 2007 at 11:06 am
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}
May 9th, 2007 at 12:13 pm
Good find, just fixed it.
Thanks,
Eric
May 15th, 2007 at 3:05 am
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
May 15th, 2007 at 7:07 am
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
May 16th, 2007 at 6:07 am
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
May 18th, 2007 at 9:54 pm
Love it..
Thanks Eric
May 22nd, 2007 at 3:32 am
Cairngorm Code Generator…
Eric Feminella hat auf seinem Blog die Version 1.2 seines Cairngorm Code Generators Cairngem veröffentlicht.
Der Generator ist komplett Ant basiert und erzeugt Implementierungen der einzelnen AS3 Klassen als auch die typische Ordnerstruktur für ein …
May 30th, 2007 at 3:46 am
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/
May 30th, 2007 at 7:05 am
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”).
June 14th, 2007 at 11:38 am
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
July 11th, 2007 at 10:34 pm
[…] Eric Feminella - cairngen-ant-tasks […]
July 16th, 2007 at 3:57 am
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
August 18th, 2007 at 8:44 am
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
August 18th, 2007 at 6:04 pm
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
September 7th, 2007 at 7:00 am
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
June 3rd, 2008 at 5:46 pm
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.