Home » Language IDEs » AspectJ » cross-project aspects?
cross-project aspects? [message #62304] |
Tue, 28 February 2006 02:30  |
Eclipse User |
|
|
|
Originally posted by: yoduderoo.netscape.net
Hi,
Should it be possible to define an Aspect in one project which weaves
into code from another?
For example, I create an AspectJ project A. I convert an existing Java
project, B, by right-clicking the Java project and performing relevant
action. I create an aspect, TestAspect, in project A which defines a
pointcut on a Java source in B. It compiles, but there are no markers.
If I move the source from B into aspect project A, the markers appear.
Can I have a separate project with my aspects which weave into other
projects?
Versions:
AJDT 1.2.1, Build 20051220151004, AspectJ version: 1.5.0
IBM RSA 6.0 (Eclipse 3.0)
JRE 1.4.2
Thanks, y
|
|
|
Re: cross-project aspects? [message #62328 is a reply to message #62304] |
Tue, 28 February 2006 05:26   |
Eclipse User |
|
|
|
Yes, it's possible.
If you make project B an AspectJ project (you don't have to have any
aspects in it!), you can add project A to the "aspect path" of
project B (under the project's properties pages). The weaving will then
take place in project A. Alternatively, if you want to keep project B as a
Java project, you could do the weaving in project A, by setting the
"in path" to be the output folder of project B.
Hope that helps,
Matt.
On Tue, 28 Feb 2006 08:30:52 +0100, Yodude wrote:
> Hi,
> Should it be possible to define an Aspect in one project which weaves
> into code from another?
>
> For example, I create an AspectJ project A. I convert an existing Java
> project, B, by right-clicking the Java project and performing relevant
> action. I create an aspect, TestAspect, in project A which defines a
> pointcut on a Java source in B. It compiles, but there are no markers.
> If I move the source from B into aspect project A, the markers appear.
>
> Can I have a separate project with my aspects which weave into other
> projects?
>
> Versions:
> AJDT 1.2.1, Build 20051220151004, AspectJ version: 1.5.0
> IBM RSA 6.0 (Eclipse 3.0)
> JRE 1.4.2
>
> Thanks, y
|
|
| | |
Re: cross-project aspects? [message #592376 is a reply to message #62304] |
Tue, 28 February 2006 05:26   |
Eclipse User |
|
|
|
Yes, it's possible.
If you make project B an AspectJ project (you don't have to have any
aspects in it!), you can add project A to the "aspect path" of
project B (under the project's properties pages). The weaving will then
take place in project A. Alternatively, if you want to keep project B as a
Java project, you could do the weaving in project A, by setting the
"in path" to be the output folder of project B.
Hope that helps,
Matt.
On Tue, 28 Feb 2006 08:30:52 +0100, Yodude wrote:
> Hi,
> Should it be possible to define an Aspect in one project which weaves
> into code from another?
>
> For example, I create an AspectJ project A. I convert an existing Java
> project, B, by right-clicking the Java project and performing relevant
> action. I create an aspect, TestAspect, in project A which defines a
> pointcut on a Java source in B. It compiles, but there are no markers.
> If I move the source from B into aspect project A, the markers appear.
>
> Can I have a separate project with my aspects which weave into other
> projects?
>
> Versions:
> AJDT 1.2.1, Build 20051220151004, AspectJ version: 1.5.0
> IBM RSA 6.0 (Eclipse 3.0)
> JRE 1.4.2
>
> Thanks, y
|
|
| | | |
Re: cross-project aspects? [message #1739474 is a reply to message #1738890] |
Tue, 02 August 2016 05:02  |
Eclipse User |
|
|
|
Update: With a vanilla standalone project I can put aspects in one project and access them from another
It seems impossible to do this if, as in my case, the project using the aspect is a RESTful webservice.
I find this hard to understand since once on a server the webservoce is just another application
I can use an aspect that resides inside the webservice but not outside.
|
|
|
Goto Forum:
Current Time: Tue May 20 08:43:40 EDT 2025
Powered by FUDForum. Page generated in 0.26212 seconds
|