Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] AJDT - cross-project weaving in WSAD

My solution is as follows:

- Convert Project A to an aspect project.
- In Project B's "Project Properties->AspectJ Compiler" tab, set the "Output jar" field
- In Project A's "Project Properties->AspectJ Compiler" tab, set the "Input jars (aspects)" field to point to the output jar from Project B (above).
- Build Project B
- Build Project A

A coworker has something similar, but prefers to keep the .class files in the bin\ directory of Project B. It requires using the "Zip Creation" plugin.

- Convert Project A to an aspect project.
- In Project B's "Project Properties->Zip Creation" tab set all the appropriate fields (I'm not familiar with the tool so can't provide specifics).
- In Project A's "Project Properties->AspectJ Compiler" tab, set the "Input jars (aspects)" field to point to the output jar from Project B (above).
- Build Project B
- Build Project A

One point of caution: make sure that in "Project Properties->Java Build Path->Libraries" tab, that none of your libraries are using variables. It appears that the 1.1.4 + 1.2 versions have problems converting the variables to their absolute paths.

-------Original Message-------
> From: Jean-Luc F Libioulle <LIBIOULLE_JEAN-LUC_F@xxxxxxxxx>
> Subject: [aspectj-users] AJDT - cross-project weaving in WSAD
> Sent: 28 Jul 2004 14:55:25
>
> Hi All,
>
> I need some help with AJDT 1.1.4 used with AspectJ 1.2 in WSAD 5.1.0. (Eclipse 2.x)
>
> Below is an answer to a former question:
>
> Suppose you have Project A which is pure Java and Project B that is AspectJ. You want to
> apply your aspects from Project B to Project A. You open the
> ProjectProperties for Project B and add a new source folder (through the
> java build path tab). When you add the source folder, make it a linked
> source folder that points to the source folder for ProjectA.
>
> When setup this, ProjectA can build as a pure java project. When you
> build ProjectB it will apply your aspects to the source from ProjectA and
> the resulting output will be put into the bin directory for ProjectB.
>
> I'm interested in doing the same thing and I tried the suggestion. Unfortunately, I'm unable to define a linked source folder.
> Actually, according to the WSAD help about linked source files, there should be a dialog with an advanced option to specifiy
> that a source folder is actually a link to a source folder within another project. I don't even see the Advanced button.
>
> Any explanation, idea, suggestion?
>
> Thanks,
> Jean-Luc Libioulle
>
> Eli Lilly and Co.
-------Original Message-------



Back to the top