You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by greenlaw110 <gr...@hotmail.com> on 2003/02/19 07:55:05 UTC
How to build aspectj source in maven
Hi,
I want to test aspectj by add a Trace.java code to the aspectj source directory.
package myPackage;
public aspect Trace
{
pointcut publicMethods() : execution(public * com.chinatm..*(..));
pointcut logObjectCalls() : execution(* ILogger.*(..));
pointcut loggableCalls() : publicMethods() && ! logObjectCalls();
before() : loggableCalls()
{
System.out.println("Enter->" + thisJoinPoint.getSignature().toString());
}
after() : loggableCalls()
{
System.out.println("Exit->" + thisJoinPoint.getSignature().toString());
}
}
I have added <aspectSourceDirectory>src/aspectj</aspectSourceDirectory> to the project.xml file. Then I type maven clean aspectj jar. The build process is success. However, I found no java source code is weaved by the aspectj code.
Then I move all source file from src/java to src/aspectj. The result is same. Can anyone tell me where I am wrong. Thx!
Green
Re: How to build aspectj source in maven
Posted by greenlaw110 <gr...@hotmail.com>.
I got the anwser, it is due to my typo! "public * com.chinatm..*(..)" should be "public * com.chinatmn..*(..)"
Sorry.
----- Original Message -----
From: "greenlaw110" <gr...@hotmail.com>
To: "Turbine Maven Users List" <tu...@jakarta.apache.org>
Sent: Wednesday, February 19, 2003 2:55 PM
Subject: How to build aspectj source in maven
> Hi,
>
> I want to test aspectj by add a Trace.java code to the aspectj source directory.
> package myPackage;
>
> public aspect Trace
> {
> pointcut publicMethods() : execution(public * com.chinatm..*(..));
>
> pointcut logObjectCalls() : execution(* ILogger.*(..));
>
> pointcut loggableCalls() : publicMethods() && ! logObjectCalls();
>
> before() : loggableCalls()
> {
> System.out.println("Enter->" + thisJoinPoint.getSignature().toString());
> }
>
> after() : loggableCalls()
> {
> System.out.println("Exit->" + thisJoinPoint.getSignature().toString());
> }
>
> }
>
> I have added <aspectSourceDirectory>src/aspectj</aspectSourceDirectory> to the project.xml file. Then I type maven clean aspectj jar. The build process is success. However, I found no java source code is weaved by the aspectj code.
>
> Then I move all source file from src/java to src/aspectj. The result is same. Can anyone tell me where I am wrong. Thx!
>
> Green
>