Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Weaving Aspect in Jar
Weaving Aspect in Jar [message #46737] Mon, 24 January 2005 14:10 Go to next message
Eclipse UserFriend
Originally posted by: ericml.audaxis.com

Hi,

I'm trying to implement an aspect on a class located in a Jar. The jar
is part of my project build path.

Is there a way to do that without having to copy the class source code
in my project?

I tried to put the jar in the inpath settings but it does not seems to work.

Thanks,

--ERic
Re: Weaving Aspect in Jar [message #46755 is a reply to message #46737] Mon, 24 January 2005 16:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mchapman.uk.ibm.com

On Mon, 24 Jan 2005 15:10:37 +0100, Eric Fesler wrote:
> I'm trying to implement an aspect on a class located in a Jar. The jar
> is part of my project build path.
>
> Is there a way to do that without having to copy the class source code
> in my project?
>
> I tried to put the jar in the inpath settings but it does not seems to work.

Yes, you can binary weave into class files in a JAR file. The JAR file
should be added to your InPath (under project Projects > AspectJ InPath)
but it doesn't need to be on your build path.

There is a preferences option to "show weaving info messages to problems
view" which should then confirm whether the weaving is happened as you
want.

If you still can't get it working, please give your AJDT version, and more
details of your setup. Is your JAR file contained within your project, or
is it external?

Regards,

Matt.
Re: Weaving Aspect in Jar [message #46872 is a reply to message #46755] Mon, 24 January 2005 17:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ericml.audaxis.com

On 01/24/2005 05:07 PM, Matt Chapman wrote:
> On Mon, 24 Jan 2005 15:10:37 +0100, Eric Fesler wrote:
>
>>I'm trying to implement an aspect on a class located in a Jar. The jar
>>is part of my project build path.
>>
>>Is there a way to do that without having to copy the class source code
>>in my project?
>>
>>I tried to put the jar in the inpath settings but it does not seems to work.
>
>
> Yes, you can binary weave into class files in a JAR file. The JAR file
> should be added to your InPath (under project Projects > AspectJ InPath)
> but it doesn't need to be on your build path.
>
> There is a preferences option to "show weaving info messages to problems
> view" which should then confirm whether the weaving is happened as you
> want.
>
> If you still can't get it working, please give your AJDT version, and more
> details of your setup. Is your JAR file contained within your project, or
> is it external?
>

> Regards,
>
> Matt.
>

Thanks Matt for the quick answer.

I'm using AJDT version: 1.1.12

I already tried to put the JAR in the inPath but it didn't work.

The jar is not in the project. It's coming from my maven repository and
it is defined as an external jar (I tried to use variable extension but
the variable name is not translated - ajdt is looking for
<project_dir>/MAVEN_REPO/<jar path in the repository>)

This is maybe the issue. I will try with the jar in the project.

Thanks again,

--ERic
Re: Weaving Aspect in Jar [message #46931 is a reply to message #46872] Mon, 24 January 2005 17:38 Go to previous message
Eclipse UserFriend
Originally posted by: mchapman.uk.ibm.com

On Mon, 24 Jan 2005 18:23:09 +0100, Eric Fesler wrote:
> I'm using AJDT version: 1.1.12
>
> I already tried to put the JAR in the inPath but it didn't work.
>
> The jar is not in the project. It's coming from my maven repository and
> it is defined as an external jar (I tried to use variable extension but
> the variable name is not translated - ajdt is looking for
> <project_dir>/MAVEN_REPO/<jar path in the repository>)
>
> This is maybe the issue. I will try with the jar in the project.

Hopefully that will work. Various bugs in this area have been fixed in
AJDT 1.2.0M2, including the variable name translation, so you may also
like to try that. I remember there was also a problem with external
inpath and aspectpath jars on Linux.

Regards,

Matt.
Re: Weaving Aspect in Jar [message #586147 is a reply to message #46737] Mon, 24 January 2005 16:07 Go to previous message
Matt Chapman is currently offline Matt ChapmanFriend
Messages: 429
Registered: July 2009
Senior Member
On Mon, 24 Jan 2005 15:10:37 +0100, Eric Fesler wrote:
> I'm trying to implement an aspect on a class located in a Jar. The jar
> is part of my project build path.
>
> Is there a way to do that without having to copy the class source code
> in my project?
>
> I tried to put the jar in the inpath settings but it does not seems to work.

Yes, you can binary weave into class files in a JAR file. The JAR file
should be added to your InPath (under project Projects > AspectJ InPath)
but it doesn't need to be on your build path.

There is a preferences option to "show weaving info messages to problems
view" which should then confirm whether the weaving is happened as you
want.

If you still can't get it working, please give your AJDT version, and more
details of your setup. Is your JAR file contained within your project, or
is it external?

Regards,

Matt.
Re: Weaving Aspect in Jar [message #586199 is a reply to message #46755] Mon, 24 January 2005 17:23 Go to previous message
Eric Fesler is currently offline Eric FeslerFriend
Messages: 2
Registered: July 2009
Junior Member
On 01/24/2005 05:07 PM, Matt Chapman wrote:
> On Mon, 24 Jan 2005 15:10:37 +0100, Eric Fesler wrote:
>
>>I'm trying to implement an aspect on a class located in a Jar. The jar
>>is part of my project build path.
>>
>>Is there a way to do that without having to copy the class source code
>>in my project?
>>
>>I tried to put the jar in the inpath settings but it does not seems to work.
>
>
> Yes, you can binary weave into class files in a JAR file. The JAR file
> should be added to your InPath (under project Projects > AspectJ InPath)
> but it doesn't need to be on your build path.
>
> There is a preferences option to "show weaving info messages to problems
> view" which should then confirm whether the weaving is happened as you
> want.
>
> If you still can't get it working, please give your AJDT version, and more
> details of your setup. Is your JAR file contained within your project, or
> is it external?
>

> Regards,
>
> Matt.
>

Thanks Matt for the quick answer.

I'm using AJDT version: 1.1.12

I already tried to put the JAR in the inPath but it didn't work.

The jar is not in the project. It's coming from my maven repository and
it is defined as an external jar (I tried to use variable extension but
the variable name is not translated - ajdt is looking for
<project_dir>/MAVEN_REPO/<jar path in the repository>)

This is maybe the issue. I will try with the jar in the project.

Thanks again,

--ERic
Re: Weaving Aspect in Jar [message #586233 is a reply to message #46872] Mon, 24 January 2005 17:38 Go to previous message
Matt Chapman is currently offline Matt ChapmanFriend
Messages: 429
Registered: July 2009
Senior Member
On Mon, 24 Jan 2005 18:23:09 +0100, Eric Fesler wrote:
> I'm using AJDT version: 1.1.12
>
> I already tried to put the JAR in the inPath but it didn't work.
>
> The jar is not in the project. It's coming from my maven repository and
> it is defined as an external jar (I tried to use variable extension but
> the variable name is not translated - ajdt is looking for
> <project_dir>/MAVEN_REPO/<jar path in the repository>)
>
> This is maybe the issue. I will try with the jar in the project.

Hopefully that will work. Various bugs in this area have been fixed in
AJDT 1.2.0M2, including the variable name translation, so you may also
like to try that. I remember there was also a problem with external
inpath and aspectpath jars on Linux.

Regards,

Matt.
Previous Topic:New AJDT development build containing latest AspectJ5 development build
Next Topic:Memory requirement for ajdt
Goto Forum:
  


Current Time: Fri Apr 19 07:19:36 GMT 2024

Powered by FUDForum. Page generated in 0.01931 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top