PlexusContainerAdapter plexus = new PlexusContainerAdapter();
plexus.setApplicationContext( context );
beanFactory.registerSingleton( "plexusContainer", plexus );
// Register a beanPostProcessor to handle plexus interface-based lifecycle management
lifecycleBeanPostProcessor = new PlexusLifecycleBeanPostProcessor();
lifecycleBeanPostProcessor.setBeanFactory( context );
beanFactory.addBeanPostProcessor( lifecycleBeanPostProcessor );
// Register a PropertyEditor to support plexus XML <configuration> set as CDATA in
// a spring context XML file.