> So you are trying to use aspects simply for testing. I'm just want to > make sure I understand you as I wanted to write some standard aspects > for testing standard things like accessors just to make sure they work > correctly.
Yup, aspects solely for unit testing. In the style of this article: http://www-106.ibm.com/developerworks/java/library/j-aspectj2/ Basically we have some JNDI stuff that we want to unit test, but don't really want to have query the actual LDAP server. Mock objects and refactoring will only get you so far in that regard. We want to use aspects to intercept the calls to the LDAP server and return some mock objects. > I was going to try and use the preprocessor option and generate java > sources and then use the method that the antlr plugin uses to > dynamically add a new source path. It would be very cool to integrate > some standard testing aspects for projects that may or may not use > aspects. Wouldn't this be along the lines of the pattern testing maven plugin? > I think letting the aspects getting weaved and processed to produce > standard java sources might be the best option for this. I wasn't aware that ajc could produce .java files. This seems like the best approach. The only issue I can see is getting additional files on ajc's source path. Our aspects, as written, refer to classes in the unitTestSourceDirectory but I can't see a way to make the aspectj plugin see those classes. So aspect compilation fails. I have a feeling I'm missing something fundamental here. Dan -- Dan Everton (Engineering Infrastructure Coordinator) Central Engineering, Boeing Australia Limited Phone: +61 07 3306 3288 -- Email: [EMAIL PROTECTED] -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
