Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re:[aspectj-users] Load-time weaving problem

Kunal,

thanks for your reply!

On 25.02.2008, at 21:26, Kunal Pathak wrote:

Are you using the aj command to see the output? Have you created the aop.xml that is essential for weaving the aspects at load-time?

No, I'm using the java executable of Mac OS X and provide a java agent. Like: java -javaagent:lib/aspectjweaver.jar ....

The problem was to not have an aop.xml (stupid me!) but now I have a question regarding this file. I'm using the 'new' @AspectJ syntax and my aspects are annotated with @Aspect. Load-time weaving now works with a aop.xml like this:

	<aspectj>
	    <aspects options="-verbose -debug">
	        <aspect name="com.example.foo.aspects.SomeAspect"/>
	    </aspects>
	    <weaver options="-verbose">
	        <include within="com.example.foo..*"/>
	    </weaver>
	</aspectj>

Unfortunately I have to explicitly name the aspect by it's class name. I think the weaver could be smart enough to find the annotated classes automatically? Is that possible as well?

Best regards and thanks in advance,
 Stefan



Back to the top