Cross Project reference [message #63053] |
Tue, 21 March 2006 09:34  |
Eclipse User |
|
|
|
Originally posted by: satish.subramaniam.rediffmail.com
Some clarifactions required using aspectJ and AJDT.
Assume that I two projects:
Project A - AspectJ project that contains only the aspects.
Project B - Is a normal java project.
While writing the aspects in proj.A, my aspects will need to make some
references to project B java files E.g: Load some configuration. How can
this be achieved? I tried by adding the project B to the java build path
(under projects) of the aspectJ project A. Now i can access the classes of
project B in the aspect, but when i run my main class using the aspect-J
load time weaving option - my aspects don't get invoked. My main class
that i run is in the java project B. how can this be achieved ?
|
|
|
|
|
|
|
|
Re: Cross Project reference [message #592636 is a reply to message #63053] |
Tue, 21 March 2006 11:02  |
Eclipse User |
|
|
|
Hi Satish,
You need to add Project A to the load-time weaving aspectpath, which is
configured through a tab called "LTW Aspectpath" in the run dialog.
Sian
Satish wrote:
> Some clarifactions required using aspectJ and AJDT.
>
> Assume that I two projects:
>
> Project A - AspectJ project that contains only the aspects.
> Project B - Is a normal java project.
>
> While writing the aspects in proj.A, my aspects will need to make some
> references to project B java files E.g: Load some configuration. How can
> this be achieved? I tried by adding the project B to the java build path
> (under projects) of the aspectJ project A. Now i can access the classes
> of project B in the aspect, but when i run my main class using the
> aspect-J load time weaving option - my aspects don't get invoked. My
> main class that i run is in the java project B. how can this be achieved ?
>
|
|
|
Re: Cross Project reference [message #592702 is a reply to message #63053] |
Wed, 29 March 2006 19:09  |
Eclipse User |
|
|
|
Actually, I am having the same problem. I saw Sian's reply, but I don't
see any such "LTW Aspectpath" in any properties anywhere. I do see an
"AspectJ aspect path" in the project properties, where I can add class
folders. I have added the class folders of the two projects I want to
weave my aspect into, and it looks like the correct classes are being
woven when I run the builder. However, my aspect is never invoked.
Additional help here would be great.
Don
Satish wrote:
> Some clarifactions required using aspectJ and AJDT.
>
> Assume that I two projects:
>
> Project A - AspectJ project that contains only the aspects.
> Project B - Is a normal java project.
>
> While writing the aspects in proj.A, my aspects will need to make some
> references to project B java files E.g: Load some configuration. How can
> this be achieved? I tried by adding the project B to the java build path
> (under projects) of the aspectJ project A. Now i can access the classes
> of project B in the aspect, but when i run my main class using the
> aspect-J load time weaving option - my aspects don't get invoked. My
> main class that i run is in the java project B. how can this be achieved ?
>
|
|
|
Re: Cross Project reference [message #592716 is a reply to message #63169] |
Thu, 30 March 2006 02:56  |
Eclipse User |
|
|
|
Originally posted by: hawkinsh.uk.ibm.com
The "LTW Aspectpath" tab is in the run configuration for an "AspectJ
Load-Time weaving application". So, you need to do run > run as and select
the aspectj load-time weaving application configuration to run your
program.
|
|
|
Re: Cross Project reference [message #592718 is a reply to message #63192] |
Thu, 30 March 2006 10:02  |
Eclipse User |
|
|
|
Thanks, Helen. This leads me to the question of how in the world would
I run this in an application server in a production environment???
Helen Hawkins wrote:
> The "LTW Aspectpath" tab is in the run configuration for an "AspectJ
> Load-Time weaving application". So, you need to do run > run as and
> select the aspectj load-time weaving application configuration to run
> your program.
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.30174 seconds