On 3. okt. 2007, at 12.40, Markus Umefjord wrote:

It turns out that it was my non-standard source and test-source directories that needed configuration with the aspectDirectory and testAspectDirectory
tags.

Good


However - there is another problem:

I want to pointcut with an "after advise" at the end of the test cycle, i.e.
when all tests have completed, on one of the following patterns:

execute(* org.apache.maven.surefire.Surefire.run(..))
|| execute(* org.apache.maven.plugin.surefire.SurefirePlugin.execute ());

Pointcutting the surefire and surefire-plugin jar files fails, and I have tried using different configurations within the <weaveDependencies>- tags.

Has anyone successfully tried this? Any ideas?

I guess this is not so simple to do, since the surefire plugin forks the vm, creating its own classpath. But it should be doable if not surefire is bootstrapped in the classpath. AspectJ will place all the weaved classes from dependencies in the target area. But I would inspect the surefire plugin finding out how the classpath is built, and then see if you in some way can get the aspectJ weaved classes in the target area first

/Kaare Nilsen

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to