Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Using Aspects from JAR files

Hello,

I have one project A that uses some aspects from a JAR, generated by another 
project B.

In B, I have the following aspect:

package mypackage;

public aspect MyAspect {

	public final pointcut all() :  
		!none(); 
 
	public final pointcut none();
}

In A, I have this:

public aspect AnotherAspect {

	public pointcut declareWarningScope() : 
		mypackage.MyAspect.all();
	 
	public final pointcut declareErrorScope() :  
		!declareWarningScope();

	declare warning : 
		declareWarningScope() &&
		call(* *.foo(..)) :
		"Warning";

	declare error : 
		declareErrorScope() &&
		call(* *.foo(..)) :
		"Error";
}

The previous was supposed to show a warning message and not an error one. 
However, I got a compilation error message!

When I put the aspect in the B project inside A, it works just fine. What is 
the problem here? A little help would be appreciated.

Thanks in advance,

Paulo Zenida


Back to the top