Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Maven plugin ignores slf4j


    That did it. Thanks!

    BTW: It's important to add a concrete implementation (such as logback) as a dependency, not just slf4j.

Gili

On 30/08/2011 11:31 AM, Jesse McConnell [via Jetty] wrote:
see http://maven.apache.org/pom.html#Plugins

cheers,
jesse

--
jesse mcconnell
[hidden email]



On Tue, Aug 30, 2011 at 10:29, Jesse McConnell
<[hidden email]> wrote:

> that is the way maven works yes
>
> you should add slf4j to the dependency of the plugin if you want it enabled
>
> ie, add a <dependencies> section _to_ the <plugin> decl
>
> jesse
>
> --
> jesse mcconnell
> [hidden email]
>
>
>
> On Tue, Aug 30, 2011 at 10:26, cowwoc <[hidden email]> wrote:
>> Something seems to be broken with the Jetty Maven plugin. If I run Jetty
>> using exec:exec:
>>
>>      <plugin>
>>        <groupId>org.codehaus.mojo</groupId>
>>        <artifactId>exec-maven-plugin</artifactId>
>>        <version>1.2</version>
>>        <executions>
>>          <execution>
>>            <goals>
>>              <goal>exec</goal>
>>            </goals>
>>          </execution>
>>        </executions>
>>        <configuration>
>>          <executable>java</executable>
>>          <arguments>
>>            <argument>-classpath</argument>
>>            <classpath/>
>>            <argument>-ea</argument>
>>            <argument>com.foo.Main</argument>
>>          </arguments>
>>        </configuration>
>>      </plugin>
>>
>> Then slf4j logging works. If I use jetty:run instead:
>>
>>      <plugin>
>>        <groupId>org.mortbay.jetty</groupId>
>>        <artifactId>jetty-maven-plugin</artifactId>
>>        <version>7.4.4.v20110707</version>
>>        <configuration>
>>          <scanIntervalSeconds>5</scanIntervalSeconds>
>>          <connectors>
>>            <connector
>> implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
>>              <port>80</port>
>>            </connector>
>>          </connectors>
>>        </configuration>
>>      </plugin>
>>
>> Then slf4j logging does not work. I want to emphasize the fact that the
>> pom.xml file is *identical*. The only thing I am changing is whether I'm
>> invoking exec:exec or jetty:run. Hence, this can't be a simple dependency
>> problem (my project depends on logback-classic).
>>
>> My guess is that the Maven plugin is ignoring the project classpath.
>>
>> Gili
>>
>> --
>> View this message in context: http://jetty.1047016.n5.nabble.com/Maven-plugin-ignores-slf4j-tp4750433p4750433.html
>> Sent from the jetty-users mailing list archive at Nabble.com.
>> _______________________________________________
>> jetty-users mailing list
>> [hidden email]
>> https://dev.eclipse.org/mailman/listinfo/jetty-users
>>
>
_______________________________________________
jetty-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jetty-users



If you reply to this email, your message will be added to the discussion below:
http://jetty.1047016.n5.nabble.com/Maven-plugin-ignores-slf4j-tp4750433p4750448.html
To unsubscribe from Maven plugin ignores slf4j, click here.



View this message in context: Re: [jetty-users] Maven plugin ignores slf4j
Sent from the jetty-users mailing list archive at Nabble.com.

Back to the top