inpath aspectpath and multiple projects [message #72278] |
Fri, 03 October 2008 09:41  |
Eclipse User |
|
|
|
Hi,
I'm trying to get an AspectJ project that only contains aspects and
supporting classes to work together with (i.e. advise) the classes
created in another project. From the documentation it looks like it
should be possible to achieve this somehow via inpath/aspectpath, but I
can't get it to work. I guess I'm missing something fundamental here.
The steps I took:
1. Created an AspectJ project "A" to create my aspects (tested the
pointcuts with a local class and they were fine)
2. Created a Java project "J" that contains the classes that should be
advised.
3.a.) Added "J" to the inpath of "A". (That had no effect on the test
runs of J)
3.b.) Added "A" to the aspectpath of "J". (That had no effect on the
test runs of J).
3.c.) Copied all .class files generated by "A" into the output folder of
"A". That had no effect.
3.d.) Converted "J" to an AspectJ project and did the same as above. No
effect.
What am I missing?
Jochen
|
|
|
Re: inpath aspectpath and multiple projects [message #72353 is a reply to message #72278] |
Mon, 20 October 2008 08:08  |
Eclipse User |
|
|
|
Jochen a écrit :
> Hi,
>
> I'm trying to get an AspectJ project that only contains aspects and
> supporting classes to work together with (i.e. advise) the classes
> created in another project. From the documentation it looks like it
> should be possible to achieve this somehow via inpath/aspectpath, but I
> can't get it to work. I guess I'm missing something fundamental here.
>
> The steps I took:
>
> 1. Created an AspectJ project "A" to create my aspects (tested the
> pointcuts with a local class and they were fine)
>
> 2. Created a Java project "J" that contains the classes that should be
> advised.
>
> 3.a.) Added "J" to the inpath of "A". (That had no effect on the test
> runs of J)
>
> 3.b.) Added "A" to the aspectpath of "J". (That had no effect on the
> test runs of J).
>
> 3.c.) Copied all .class files generated by "A" into the output folder of
> "A". That had no effect.
>
> 3.d.) Converted "J" to an AspectJ project and did the same as above. No
> effect.
>
>
> What am I missing?
>
> Jochen
Hello,
You must convert J as an AspectJ project and then add in the aspect path
of J the class folders of your aspects "Add Class Folder ..."
Be sure that you selected the folders with .class files and not .java files.
Mickaël.
|
|
|
Re: inpath aspectpath and multiple projects [message #599152 is a reply to message #72278] |
Mon, 20 October 2008 08:08  |
Eclipse User |
|
|
|
Jochen a écrit :
> Hi,
>
> I'm trying to get an AspectJ project that only contains aspects and
> supporting classes to work together with (i.e. advise) the classes
> created in another project. From the documentation it looks like it
> should be possible to achieve this somehow via inpath/aspectpath, but I
> can't get it to work. I guess I'm missing something fundamental here.
>
> The steps I took:
>
> 1. Created an AspectJ project "A" to create my aspects (tested the
> pointcuts with a local class and they were fine)
>
> 2. Created a Java project "J" that contains the classes that should be
> advised.
>
> 3.a.) Added "J" to the inpath of "A". (That had no effect on the test
> runs of J)
>
> 3.b.) Added "A" to the aspectpath of "J". (That had no effect on the
> test runs of J).
>
> 3.c.) Copied all .class files generated by "A" into the output folder of
> "A". That had no effect.
>
> 3.d.) Converted "J" to an AspectJ project and did the same as above. No
> effect.
>
>
> What am I missing?
>
> Jochen
Hello,
You must convert J as an AspectJ project and then add in the aspect path
of J the class folders of your aspects "Add Class Folder ..."
Be sure that you selected the folders with .class files and not .java files.
Mickaël.
|
|
|
Powered by
FUDForum. Page generated in 0.03814 seconds