Aspect Libraries [message #19868] |
Wed, 30 April 2003 14:35 |
Eclipse User |
|
|
|
Originally posted by: dev.pirsch.org
Hi,
I'm pretty new to AspectJ.
Is is possible to create an aspect library. What I would like is to put
a bunch of reusable aspects (tracing for example) in a .jar (or .aar -
Aspect ARchive :-) ) so I can compile an application module with it. I
don't want to actually recompile or refer to the aspect source in each
of my application module (all of my application module are in seperate
source tree).
Is that something that can be done?
On another note, is there some Javadoc for stuff like "thisJoinPoint"?,
It looks like the download (update) for the Eclipse Plugin does not have it.
Thank's!
|
|
|
Re: Aspect Libraries [message #20997 is a reply to message #19868] |
Thu, 08 May 2003 17:56 |
Eclipse User |
|
|
|
Originally posted by: adrian_colyer.uk.ibm.com
On Wed, 30 Apr 2003 10:35:58 -0400, Emmanuel Pirsch <dev@pirsch.org> wrote:
> Hi,
>
> I'm pretty new to AspectJ.
>
> Is is possible to create an aspect library. What I would like is to put a
> bunch of reusable aspects (tracing for example) in a .jar (or .aar -
> Aspect ARchive :-) ) so I can compile an application module with it. I
> don't want to actually recompile or refer to the aspect source in each of
> my application module (all of my application module are in seperate
> source tree).
>
> Is that something that can be done?
You can do this with AspectJ 1.1.x (and the corresponding AJDT levels).
First describing how to do this from the command-line:
* For the project containing the aspects, use the -outjar option which will
create a library jar containing your aspects.
* For the projects that wish to use the aspect library, compile with the -
aspectpath option, passing in the path to your library jar
The process is essentially the same using AJDT :-you'll find the new
compiler options in the preferences for the project. In the aspect library
project you may need to refresh the project directory after a build for
AJDT to pick up the newly created jar (must fix that...). Place the new jar
in the "aspectpath" of the dependent projects (at the moment you specify a
fully-qualified path to the jar, we need to improve the ui here).
>
> On another note, is there some Javadoc for stuff like "thisJoinPoint"?,
> It looks like the download (update) for the Eclipse Plugin does not have
> it.
>
There was a packaging error in 1.1rc1 which caused the javadoc to be
omitted. It will be back in the 1.1rc2 release, due any day now!
> Thank's!
>
>
>
--
Adrian
|
|
|
Re: Aspect Libraries [message #21005 is a reply to message #20997] |
Thu, 08 May 2003 18:52 |
Eclipse User |
|
|
|
Originally posted by: eclipse.wingspread.fastmail.fm
On Thu, 08 May 2003 18:56:45 +0100, Adrian Colyer
<adrian_colyer@uk.ibm.com> wrote:
> [...]
>
> You can do this with AspectJ 1.1.x (and the corresponding AJDT levels).
> First describing how to do this from the command-line:
>
> * For the project containing the aspects, use the -outjar option which
> will create a library jar containing your aspects.
> * For the projects that wish to use the aspect library, compile with the -
>
>
>
I'm using Eclipse to generate a aspect library and I've noticed that if I
specify an outjar parameter in the properties section, the jar file goes to
the Eclipse root directory. I would have expected it to go in the project
directory. Doesn't seem like I should have to specify the full path to my
project if that is where I want the output jar to be built.
--
James Howe
|
|
|
Re: Aspect Libraries [message #21012 is a reply to message #21005] |
Fri, 09 May 2003 08:50 |
Eclipse User |
|
|
|
Originally posted by: adrian_colyer.uk.ibm.com
On Thu, 08 May 2003 14:52:14 -0400, James Howe
<eclipse@wingspread.fastmail.fm> wrote:
> I'm using Eclipse to generate a aspect library and I've noticed that if I
> specify an outjar parameter in the properties section, the jar file goes
> to the Eclipse root directory. I would have expected it to go in the
> project directory. Doesn't seem like I should have to specify the full
> path to my project if that is where I want the output jar to be built.
>
We agree... in fact the whole means of specifying those jar files for the
new options needs fixing - there should be a proper browsing interface such
as you get for the java build path management rather than typing in paths
at all. It's on the list!
--
Adrian
|
|
|
Re: Aspect Libraries [message #21023 is a reply to message #21012] |
Fri, 09 May 2003 12:22 |
Eclipse User |
|
|
|
Originally posted by: eclipse.wingspread.fastmail.fm
On Fri, 09 May 2003 09:50:24 +0100, Adrian Colyer
<adrian_colyer@uk.ibm.com> wrote:
> On Thu, 08 May 2003 14:52:14 -0400, James Howe
> <eclipse@wingspread.fastmail.fm> wrote:
>
>
>> I'm using Eclipse to generate a aspect library and I've noticed that if
>> I specify an outjar parameter in the properties section, the jar file
>> goes to the Eclipse root directory. I would have expected it to go in
>> the project directory. Doesn't seem like I should have to specify the
>> full path to my project if that is where I want the output jar to be
>> built.
>>
>
> We agree... in fact the whole means of specifying those jar files for the
> new options needs fixing - there should be a proper browsing interface
> such as you get for the java build path management rather than typing in
> paths at all. It's on the list!
>
Yes, a browse capability would be nice. I've also noticed a strange thing
which happens sometimes (I haven't figured out the exact circumstances)
when specifying injar parameters. In one of my projects I have a 'lib'
directory which contains some jars. In my AspectJ parameters I specified
injars using names like lib/foo.jar;lib/bar.jar. I rebuilt the project and
things worked fine. I created another AspectJ project and did something
similar. When I specified lib/xxx.jar;lib/yyy.jar, I received a dialog
telling me that 'c:/blah/blah/workspace/First Project/lib/xxx.jar' wasn't
found. The interesting thing is that the project I was saving the
preferences for was 'Second Project' not 'First Project'. For some reason,
whatever it is that looks up the jar files was confused about where it was
running from. Have you ever seen anything like this before?
--
James Howe
|
|
|
Re: Aspect Libraries [message #21034 is a reply to message #21023] |
Mon, 12 May 2003 09:52 |
Eclipse User |
|
|
|
Originally posted by: clemas.hursley.ibm.com
James Howe wrote:
> Yes, a browse capability would be nice. I\'ve also noticed a strange thing
> which happens sometimes (I haven\'t figured out the exact circumstances)
> when specifying injar parameters. In one of my projects I have a \'lib\'
> directory which contains some jars. In my AspectJ parameters I specified
> injars using names like lib/foo.jar;lib/bar.jar. I rebuilt the project and
> things worked fine. I created another AspectJ project and did something
> similar. When I specified lib/xxx.jar;lib/yyy.jar, I received a dialog
> telling me that \'c:/blah/blah/workspace/First Project/lib/xxx.jar\' wasn\'t
> found. The interesting thing is that the project I was saving the
> preferences for was \'Second Project\' not \'First Project\'. For some
reason,
> whatever it is that looks up the jar files was confused about where it was
> running from. Have you ever seen anything like this before?
Hi James. I\'ve just been looking in the code - its down to something we
seem to constantly have problems with - the tracking of which project is
currently selected. In your situation you somehow managed to get the
project properties dialog up without us receiving an appropriate event to
say you had switched to \'Second Project\' - not your fault, our fault -
I\'ll take a look at fixing it now.
cheers,
Andy.
AJDT Development
|
|
|
Re: Aspect Libraries [message #21050 is a reply to message #21034] |
Mon, 12 May 2003 12:56 |
Eclipse User |
|
|
|
Originally posted by: clemas.hursley.ibm.com
Andy Clement wrote:
> Hi James. I've just been looking in the code - its down to something we
> seem to constantly have problems with - the tracking of which project is
> currently selected. In your situation you somehow managed to get the
> project properties dialog up without us receiving an appropriate event to
> say you had switched to 'Second Project' - not your fault, our fault -
> I'll take a look at fixing it now.
Following up on my own post, I believe I have just fixed this problem -
the fix will be in the imminent 0.6.2 release.
cheers,
Andy.
AJDT Development
|
|
|
Re: Aspect Libraries [message #566256 is a reply to message #19868] |
Thu, 08 May 2003 17:56 |
Adrian Colyer Messages: 61 Registered: July 2009 |
Member |
|
|
On Wed, 30 Apr 2003 10:35:58 -0400, Emmanuel Pirsch <dev@pirsch.org> wrote:
> Hi,
>
> I'm pretty new to AspectJ.
>
> Is is possible to create an aspect library. What I would like is to put a
> bunch of reusable aspects (tracing for example) in a .jar (or .aar -
> Aspect ARchive :-) ) so I can compile an application module with it. I
> don't want to actually recompile or refer to the aspect source in each of
> my application module (all of my application module are in seperate
> source tree).
>
> Is that something that can be done?
You can do this with AspectJ 1.1.x (and the corresponding AJDT levels).
First describing how to do this from the command-line:
* For the project containing the aspects, use the -outjar option which will
create a library jar containing your aspects.
* For the projects that wish to use the aspect library, compile with the -
aspectpath option, passing in the path to your library jar
The process is essentially the same using AJDT :-you'll find the new
compiler options in the preferences for the project. In the aspect library
project you may need to refresh the project directory after a build for
AJDT to pick up the newly created jar (must fix that...). Place the new jar
in the "aspectpath" of the dependent projects (at the moment you specify a
fully-qualified path to the jar, we need to improve the ui here).
>
> On another note, is there some Javadoc for stuff like "thisJoinPoint"?,
> It looks like the download (update) for the Eclipse Plugin does not have
> it.
>
There was a packaging error in 1.1rc1 which caused the javadoc to be
omitted. It will be back in the 1.1rc2 release, due any day now!
> Thank's!
>
>
>
--
Adrian
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04426 seconds