cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Bundling ASM in CXF
Date Thu, 30 Oct 2008 13:48:41 GMT

Or if Class.forName("org.objectweb.asm.ClassWriter") fails, then also check 
for Class.forName("org.apache.cxf.asm.ClassWriter") or whatever the shaded 
name is. 

:-)

Dan

On Thursday 30 October 2008 7:41:15 am Ian Roberts wrote:
> Willem Jiang wrote:
> > Hi Ian,
> >
> > I went through the WrapperHelper that you show me. I think the code just
> >   works as button which enables of disables the WrapperHelperCompiler.
> > The WrapperHelperCompiler uses the ASM with the hard dependencies and
> > maven shade plugin will take care of it.
>
> But if the Class.forName("org.objectweb.asm.ClassWriter") fails with a
> ClassNotFoundException - which it will do if you don't have a "real" ASM
> in the normal package on your classpath - then WrapperHelperCompiler
> doesn't get called at all and according to the comment it'll "just use
> reflection based stuff".  As far as I can see, the only way round this
> is to change the class name parameter of the forName call to match the
> shaded package.
>
> There's probably some clever hoops we can jump through, e.g. loading the
> class name from some file in META-INF, and then replacing that file in
> the shaded version of the JAR, but that seems messier to me than just
> using the shaded ASM in the first place.
>
> I'll stop going on about this now, honest ;-)
>
> Ian



-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Mime
View raw message