From: Ceki <li...@qo...> - 2006-03-22 15:26:33
|
Jan, Thank you for the lengthy response. From what you state, it looks like you= =20 are doing the maximum without explicit support from Maven. However,=20 wouldn't it be nicer if Maven itself provided ways for the user to specify= =20 the preferred implementation of a given API? It seems like a basic=20 requirement to me. I'll go knock on Maven's door to see what they have to= say. At 02:13 PM 3/22/2006, Jan Bartel wrote: >Hi Ceki, > >I'm 90% of the way there with the jetty maven plugin. At runtime, I >check the classpath for commons-logging and then slf4j classes. >If a user has put commons-logging on to the classpath of the plugin >(eg via a plugin dependency or via a project dependency) then I >remove the jcl-over-slf4j and the slf4j-simple jars from the plugin's=20 >classpath as the user is control of their logging. If I can't find a=20 >commons-logging impl, I check for an slf4j impl. Again, >if the user has specified an impl, I get rid of the default slf4j-simple >jar from the classpath. If the user hasn't specified any logging, then >I use the defaults of jcl-over-slf4j and slf4j-simple. > >In order to change the classpath of the plugin, I have had to introduce=20 >another URLClassloader as the child of the maven plugin runtime >classloader. The problem is that the maven classworld classloader is=20 >misbehaving and doesn't delegate correctly on resolution calls >from the child. I think this is a known problem and will probably be fixed= =20 >in the next version of maven. However, in the meanwhile >I am doing some workarounds. I've got a little way to go with the >workarounds, but I think it will be able to be done. > >cheers >Jan >Ceki G=FClc=FC wrote: >>At 12:26 AM 3/21/2006, Jan Bartel wrote: >> >>>As for leaving the user to select a log implementation for the plugin,= I'd >>>much rather have it work straight out of the box, but allow the user to >>>configure a different slf4j logging delegate if they want. >> >>+1 >>How do we go from a wish to actually making it happen? Apache Directory=20 >>project faces a similar situation and probably many other projects as= well. >> >>>cheers >>>Jan > > > >------------------------------------------------------- >This SF.Net email is sponsored by xPML, a groundbreaking scripting language >that extends applications into web and mobile media. Attend the live= webcast >and join the prime developer group breaking into this new coding territory! >http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat=3D1= 21642 >_______________________________________________ >Jetty-support mailing list >Jet...@li... >https://lists.sourceforge.net/lists/listinfo/jetty-support --=20 Ceki G=FClc=FC http://ceki.blogspot.com/ |