Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Is it possible to use .aj files from a jar

Is there a reason why you are not adding the jar that contains
FooBarAspect onto your Aspect Path?  That should be sufficient for
compilation/weaving purposes.  I am not sure why you require the
source code for this.  The Aspect class file should be all that is
required.

2010/5/12 Konstantin Boudnik <cos@xxxxxxxxxx>:
> Hello fellow AJ'ers.
>
> I believe the answer to my question is firm no, but want to double check and
> see if someone has a better solution.
>
> I have a project which split in a few components. One is a shared and a couple
> more are based on it i.e. upstream. I have some classes in all upstream
> components which I modify with AspectJ in the following manner:
>  - declare an additional parent (an interface FooBar) for these classes
>  - inject an extra functionality to all classes of type FooBar (by FooBarAspect)
>
> Now, in order to weave upstream to classes of type FooBar I need FooBarAspect
> to be present at the compilation time. Which means that I need either:
>  - dup the file
>  - have a source dependency to the shared component
>  - pull the shared component's source artifact in the build time/unpack/use
>
> Now, first two options are ugly and pretty much unacceptable (for different
> reasons, though). The last is feasible although still non-elegant. Hence my
> question: can iajc use a source code directly from a jar file or it is
> imperative to unpack it first? From what I can see 'inpath' won't help. Any
> other options I might be unaware of?
>
> Thanks in advance for any ideas/hints you might be willing to share.
>  Cos
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>


Back to the top