Hello,
I'm trying to use an aspect to override a getInstance() on a class which
is in another project. I am able to get this working on Eclipse using the
aspectJ plugin with a Maven2 project if the support project (where the
getInstance() class is located) is open. If I close that project, and remove
it's artifact from the local maven repo, the aspect isn't being utilized.
Here's the basic setup...
Support project:
- x.getInstance()
Target project:
- contains code which is calling x.getInstance()
- contains aspect which returns a 'mock' object for x, instead of normal
production x object.
I've tried using the weaveDependency inside the plugin configuration to weave
the support project (which I would hope would handle the x.getInstance) but the
project behaves as if the aspect is having no effect.
When looking at Maven2 debug, the classpath being used is the support project
jar on the local maven repo, which does not appear to have been
modified/updated. How are 'weaved dependencies' used in the actual execution?
Is the local maven copy actually updated?
Any help is appreciated!
Regards,
Randall