On Dec 8, 2012, at 9:22 AM, Hervé BOUTEMY <herve.bout...@free.fr> wrote:
> Le vendredi 7 décembre 2012 09:32:33 Jason van Zyl a écrit : >> Hervé I will assume you're looking at this. Let me know if you need any >> help. > > yes, I'm working on it > from latest discussion, the ideal is: > > 1. compatibility: > for plugin descriptors without information, don't expose core's slf4j-api, > like it has always been the case > If this is the case we are not changing any APIs so we might want to consider actually calling this 3.0.5 and not 3.1.0 because there is no breakage. Just need to account for the following cases: - Mojo.getLog(): does not require a dependency on SLF4J API - @Inject: requires a dependency on SLF4J API - LoggerFactory.getLogger: requires a dependency on SLF4J API > 2. default on: > when using future plugin-tools 3.3, the descriptor generated by default will > enable core's slf4j-api explosition, plugin developper will need to add an > annotation to hide core's slf4j-api > > > Strategies to write a plugin using slf4j-api from core without requiring > Maven > 3.1 still need to be found: I personnally don't see how to do that. Where SLF4J can be initialized on a per classloader basis. So if a plugin descriptor says use SLF4J from core and it runs in 3.1 it will come through the core. In a version of Maven that does not use SLF4J provided the plugin descriptor parser gracefully ignores the flag then SLF4J can be initialized in the plugin classloader and it should be fine. The output will be coming out of two different systems so I'm not sure if you can aggregate it, if we want to bother, but I think SLF4J will come up properly in a version prior to 3.1. > That's why I wrote it in [1] "Of course, this will only work when run under > Maven 3.1.0, then this technique can be used safely only in Maven core > components." > > Regards, > > Hervé > > > [1] http://maven.apache.org/ref/3.1-SNAPSHOT/maven-embedder/logging.html > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > Thanks, Jason ---------------------------------------------------------- Jason van Zyl Founder & CTO, Sonatype Founder, Apache Maven http://twitter.com/jvanzyl --------------------------------------------------------- A language that doesn’t affect the way you think about programming is not worth knowing. -- Alan Perlis