It will be nice to get an out of the box support for following new Spring 2.0 features when creating an archetype. A prototype spring application will in the future see domain objects annotated with @Configurable for dependency injection. @Aspect annotation classes are nice for users who can code in java and reap the benefits of AOP. Or even pure AspectJ aspects.
Having an environment set up where adding @Configurable annotation or @Aspect annotation to a class should work. Users do not have to figure out pom.xml needs aspectj plugin entry and the dependencies of aspectjrt and aspectjweaver. Users do not need to add xmlns and xsi in applicationContext.xml to enable AOP support. They do not need to worry about should the aspects go into src./main/java folder or src/main/aspect folder. Examples in the appropriate folder will provide for a quick kickstart.
Ideally this prototype will have a sample class with @Configurable annotation which uses a dependency injected spring bean, a sample class with @Aspect annotation which can intercept domain objects, and a really nice to have a class which is a pure aspectJ aspect. i.e an object defined as public aspect.
Pom.xml is all ready to go to support spring/aspectJ integration i.e the maven plugin for aspectJ is included in the default project with all the dependencies.
Spring configuration file applicationContext.xml with all the appropriate xmlns and xsi defined to support aop. The elements aop:springconfigured and aop:autoProxy present. The @Configurable annotated class and @Aspect annotated class declared as beans. A simple spring bean provided to illustrate dependency injection into @Configurable class.
Can't wait to see this in included in RC1.
I am including some very basic java classes which will need to be packaged appropriately of course.
DomainObject.java - Is a domain object which will be injected with a GreetingService (a spring bean)
AppAspect.aj is a aspectJ aspect which intercepts any call to sayHello.
applicationContext2.xml is a basic spring xml config file