[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Using Aspects from JAR files
|
Hello,
I have found my problem. Actually, I tried to simplify my previous question
because I have not two but three projects (A, B and C), and I ended by
"hiding" the real problem. Next, I will explain the exact situation and what
my problem was:
In A, I have the aspect with the pointcuts I wish to reuse (none() and
all() ).
In B, I have a project which uses the pointcuts in A, which will then advise
C.
And finally, C uses the JAR generated from B, where the compile time error or
warning message is shown.
I had a reference in the classpath of B to A. I had also a reference in the
classpath of C to B. But I didn't have one from C to A, which caused my
problem. And that's it, I suppose :)
Thanks for your interest,
Paulo Zenida
Em Terça, 25 de Abril de 2006 12:07, o Paulo Alexandre Corigo Zenida escreveu:
> 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
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users