You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mark Hobson <ma...@gmail.com> on 2006/03/22 18:58:39 UTC

Re: [m2] jetty6 plugin & log4j

Just spotted this thread - any avid readers may be interested in:

http://jira.codehaus.org/browse/MNG-2163

Mark

On 20/02/06, David Main <d....@att.net> wrote:
> Ceki,
>
> Thanks very much for those pointers.  I see SLF4J seems to be your
> creation!  From reading the documentation at your site, I see now why
> all of my configuration efforts are ignored.
>
> And I can see now that this really isn't so much of a Maven issue as
> a Jetty one.
>
> So double-thanks for stumbling across my message and pointing me in
> the right direction.  I'm still not sure how to "instruct Maven or
> Jetty to use the correct binding" (I'm somewhat of a newbie to Java/
> Jetty/Maven), but I'll get there somehow.
>
> For what it's worth, I *love* Maven.  It has enhanced immeasurably my
> development environment.  I would not have made nearly the progress I
> have up to this point without it.
>
> --David
>
> > David,
> >
> > I am not very familiar with maven-jetty6-plugin. However, from what
> > you describe, it looks like jetty is using SLF4J's SimpleLogger
> > binding instead of its log4j binding. This is attested by the
> > following line:
> >
> >   2 [main] INFO org.mortbay.log - Logging to
> >      org.slf4j.impl.SimpleLogger@c57a6a via org.mortbay.log.Slf4jLog
> >
> > When Jetty uses SLF4J's SimpleLogger binding log4j configuration files
> > have no affect as log4j is not used by Jetty. You need to instruct
> > Maven or Jetty to use the correct binding. For more details on SLF4J
> > bindings please see http://www.slf4j.org.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] jetty6 plugin & log4j

Posted by Mark Hobson <ma...@gmail.com>.
On 22/03/06, Wayne Fay <wa...@gmail.com> wrote:
> I would think this might be addressed in the future when
> <provides>{interface}</provides> or something similar is added to
> Maven pom.
>
> Thus you could say in your jetty6 pom:
> <dep><implements>javax.logging</implements></dep>
>
> Then in the project pom:
> <dep>...log4j...<provides>javax.logging</provides></dep>
>
> Another perhaps more concrete example is javax.mail API and
> implementation. Sun created it originally but has a Sun Binary License
> so we can't distribute it in Maven repo. Projects Geronimo, Glassfish,
> and GNU Classpath all have their own versions of the javax.mail API.
> Ideally we could say in a pom "give me javax.mail, implementation 1.2
> or higher from someone" and then in another pom that depends on it, we
> could include "this is glassfish-mail.jar which implements the
> javax.mail 1.3 API" which would satisfy the dependency.
>
> I am fairly certain the Maven team knows about this use case and is
> actively working to design and implement a solution for it.

Yep, this kinda thing is scheduled for 2.1:

http://docs.codehaus.org/display/MAVEN/Specification+Dependencies+Design

Although a plugin exclusions block would provide a parallel to how
this situation is normally solve with regular project dependencies in
2.0.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] jetty6 plugin & log4j

Posted by Wayne Fay <wa...@gmail.com>.
I would think this might be addressed in the future when
<provides>{interface}</provides> or something similar is added to
Maven pom.

Thus you could say in your jetty6 pom:
<dep><implements>javax.logging</implements></dep>

Then in the project pom:
<dep>...log4j...<provides>javax.logging</provides></dep>

Another perhaps more concrete example is javax.mail API and
implementation. Sun created it originally but has a Sun Binary License
so we can't distribute it in Maven repo. Projects Geronimo, Glassfish,
and GNU Classpath all have their own versions of the javax.mail API.
Ideally we could say in a pom "give me javax.mail, implementation 1.2
or higher from someone" and then in another pom that depends on it, we
could include "this is glassfish-mail.jar which implements the
javax.mail 1.3 API" which would satisfy the dependency.

I am fairly certain the Maven team knows about this use case and is
actively working to design and implement a solution for it.

Wayne


On 3/22/06, Mark Hobson <ma...@gmail.com> wrote:
> Just spotted this thread - any avid readers may be interested in:
>
> http://jira.codehaus.org/browse/MNG-2163
>
> Mark
>
> On 20/02/06, David Main <d....@att.net> wrote:
> > Ceki,
> >
> > Thanks very much for those pointers.  I see SLF4J seems to be your
> > creation!  From reading the documentation at your site, I see now why
> > all of my configuration efforts are ignored.
> >
> > And I can see now that this really isn't so much of a Maven issue as
> > a Jetty one.
> >
> > So double-thanks for stumbling across my message and pointing me in
> > the right direction.  I'm still not sure how to "instruct Maven or
> > Jetty to use the correct binding" (I'm somewhat of a newbie to Java/
> > Jetty/Maven), but I'll get there somehow.
> >
> > For what it's worth, I *love* Maven.  It has enhanced immeasurably my
> > development environment.  I would not have made nearly the progress I
> > have up to this point without it.
> >
> > --David
> >
> > > David,
> > >
> > > I am not very familiar with maven-jetty6-plugin. However, from what
> > > you describe, it looks like jetty is using SLF4J's SimpleLogger
> > > binding instead of its log4j binding. This is attested by the
> > > following line:
> > >
> > >   2 [main] INFO org.mortbay.log - Logging to
> > >      org.slf4j.impl.SimpleLogger@c57a6a via org.mortbay.log.Slf4jLog
> > >
> > > When Jetty uses SLF4J's SimpleLogger binding log4j configuration files
> > > have no affect as log4j is not used by Jetty. You need to instruct
> > > Maven or Jetty to use the correct binding. For more details on SLF4J
> > > bindings please see http://www.slf4j.org.
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>