Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] [aspectj plugin] weaving jars to other projects + 3rd party libaries not found in those projects

Hi Michael,
can you post the <plugin> part of the pom.xml where you are configuring the AspectJ mojo?

Also, could you post the stacktrace of the exception?

Simone

Michael Rogger wrote:
Hi,

I'm using the maven plugin for aspectj, but I think most of you use that too, so I write to this mailinglist ;) I have several projects (each project is a component for the whole system) and I apply already compiled aspects to them. Everything works fine until I access a 3rd party library from the aspect, for example I call a factory class or make an instance. If I do that, I get a java.lang.NoClassDefFoundError execption, so the classloader cannot find the library. I tried several things: First I tried to include the library directly into the compiled aspect lib. The second thing I tried was to include that library in the project where I injected the aspect code using the compiled aspect lib. Unfortunately none of both worked for me and the java.lang.NoClassDefFoundError remains. My question is, how do you access within an aspect a 3rd party library? I mean where can I put those libaries into, in order that the classloader can find it, in each proejct where I weave the compiled aspects?

Thank you very much for your help, I hope someone can help me!

Best regards
Rogger



--
Simone Gianni            CEO Semeru s.r.l.           Apache Committer
http://www.simonegianni.it/



Back to the top