http://svn.codehaus.org/mojo/trunk/sandbox/warcustoms-maven-plugin/ Some IT's fail right now where they should succeed when they can get the right classes.Maybe I'm just on the wrong track, but something like this should be possible. thanks in advance -Robert From: [email protected] To: [email protected] Subject: RE: [mojo-dev] Classloader order and letting the mojo call a method from a project class Date: Thu, 3 Nov 2011 20:55:39 +0000
Benjamin, The longer the text often means the less response... I'll read the links and try to upload the first code to the sandbox this weekend. If I don't manage to fix it, you'll have a concrete example there. to be continued, thanks! -Robert > Date: Thu, 3 Nov 2011 21:46:11 +0100 > From: [email protected] > To: [email protected] > Subject: Re: [mojo-dev] Classloader order and letting the mojo call a method > from a project class > > Robert Scholte wrote: > > > But now I'm facing the following problem: If I create a new URLClassloader > > and add all required dependencies from the project (including it's > > servlet-api version X), I can't manage to call the method because it's part > > of one child-classloaders insterad of the parent. > > Maybe it's just me but that sounds like a rather vague description of > your class loader hierarchy and the actual issue... > > > I noticed Classworlds has some strategies, but it´s hard to find the right > > docs. Anyone any solution? > > Just in case some pointers to potentially helpful resources about > classworlds usage: [0, 1]. > > Might alternatively look into AntClassLoader [2] which also offers > self-first loading. > > But as said, from your description it's not clear to me what exactly > makes ordinary URLClassLoaders fail for you and would demand something > more complex. > > > Benjamin > > > [0] > https://github.com/sonatype/plexus-classworlds/blob/master/src/main/java/org/codehaus/plexus/classworlds/realm/ClassRealm.java#L32 > [1] > http://svn.apache.org/repos/asf/maven/maven-3/tags/maven-3.0.3/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java > [2] http://www.docjar.com/docs/api/org/apache/tools/ant/AntClassLoader.html > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > >
