Make the 2 aspects intercept different methods as it seems AW doesn't support weaving twice the same method... :-(
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114599 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -12,7 +12,7 @@ import org.codehaus.aspectwerkz.joinpoint.JoinPoint;
|
||||
public class SampleNonProductionAspect extends Aspect
|
||||
{
|
||||
/**
|
||||
* @Execution * *..Target.someMethod(..)
|
||||
* @Execution * *..Target.someMethod2(..)
|
||||
*/
|
||||
Pointcut sampleNonProductionPointcut;
|
||||
|
||||
@@ -22,6 +22,7 @@ public class SampleNonProductionAspect extends Aspect
|
||||
public Object sampleNonProductionAdvice(final JoinPoint joinPoint)
|
||||
throws Throwable
|
||||
{
|
||||
System.out.println("sampleNonProductionPointcut");
|
||||
return joinPoint.proceed();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.codehaus.aspectwerkz.joinpoint.JoinPoint;
|
||||
public class SampleAspect extends Aspect
|
||||
{
|
||||
/**
|
||||
* @Execution * *..Target.someMethod(..)
|
||||
* @Execution * *..Target.someMethod1(..)
|
||||
*/
|
||||
Pointcut samplePointcut;
|
||||
|
||||
@@ -21,6 +21,7 @@ public class SampleAspect extends Aspect
|
||||
*/
|
||||
public Object sampleAdvice(final JoinPoint joinPoint) throws Throwable
|
||||
{
|
||||
System.out.println("samplePointcut");
|
||||
return joinPoint.proceed();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,13 @@ package org.apache.maven.aspectwerkz;
|
||||
*/
|
||||
public class Target
|
||||
{
|
||||
public static void someMethod()
|
||||
public static void someMethod1()
|
||||
{
|
||||
System.out.println("someMethod1");
|
||||
}
|
||||
|
||||
public static void someMethod2()
|
||||
{
|
||||
System.out.println("someMethod2");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user