Robotlegs / Dependancy Injection frameworks + ANT
I’ve been playing around with DI / IoC frameworks for a while now, but new territory for me is building them with ANT. Apache ANT is an old favourite tool of mine, but was only recently that a multi-modular application required ANTing!
I couldn’t understand why after an apparently successful compilation, the application just wouldn’t work. I thought I’d save someone the googling I’ve done to try and find the answer and post it here.
By default metadata is stripped out at compile time, when using ANT unless you specify otherwise. Check your flex-config.xml and you’ll notice ‘keep-as3-metadata’ is commented out. Simply uncomment and include the metadata you want including. The following example with enable all the usual metadata tags for RobotLegs.
Bindable
Managed
ChangeEvent
NonCommittingChangeEvent
Transient
Inject
PostConstruct