Skip to main content

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

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

Attachment: pgptPeDQbchaM.pgp
Description: PGP signature


Back to the top