> > > > I have to use another package name other than the original one because > > the original package is loaded and not controlled by my code. > > > > I don't think you should mess around with the byte code in this situation. > What if other code also uses the shared library and it depends on it's > current behavior? You could introduce unforeseeable side effects. >
It's really no messing and shared libraries should be no problem. You just need to make sure to analyze and possibly rewrite all classes involved. The transitive hull of the class dependencies on the classpath. The only problem is runtime loading of classes via strings. I don't think that's covered by the code in the maven shade plugin but IIRC my original minijar implementation handled that, too. Really no black magic here. Of course: if you can do it without - do it without. cheers, Torsten
