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:
vmassol
2004-01-16 20:09:17 +00:00
parent 6083671bf9
commit cbb7a45d8d
3 changed files with 11 additions and 3 deletions

View File

@@ -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();
}
}

View File

@@ -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();
}
}

View File

@@ -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");
}
}