我試圖將我們的jetty從7升級到8,以便我們可以利用servlet 3.0。似乎沒有任何設置或配置更改是從7到8進行的。以前,我們一直在使用jetty-maven-plugin 7.2.0.RC0來mvn碼頭:run(與catalina 6.0.29,slf4j 1.5一起運行)。 9和servlet 2.5)。在更新jetty時,我必須將slf4j,log4j和javax.servlet-api依賴添加到插件中,以便不會出現API問題。卡塔利娜的依賴性一直存在。這裏的POM現在:如何啓用jetty-maven-plugin 8服務器調試輸出?
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.10.v20130312</version>
<dependencies>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-catalina</artifactId>
<version>7.0.37</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<configuration>
<webAppConfig>
<contextPath>/widgets</contextPath>
<baseResource implementation="org.eclipse.jetty.util.resource.ResourceCollection">
<resourcesAsCSV>/Users/dwinsor/neo/neo-js/src/main/webapp,/Users/dwinsor/neo/neo-js/target/neo-js</resourcesAsCSV>
</baseResource>
<overrideDescriptor>/Users/dwinsor/neo/neo-js/target/generated-resources/xml/override-web-default.xml</overrideDescriptor>
</webAppConfig>
<contextHandlers>
<contextHandler implementation="org.eclipse.jetty.webapp.WebAppContext">
<war>/Users/dwinsor/neo/neo-js/target/dependency-wars/neo.war</war>
<contextPath>/</contextPath>
<tempDirectory>/Users/dwinsor/neo/neo-js/target/tmp-neo</tempDirectory>
</contextHandler>
</contextHandlers>
<scanTargets>
<scanTarget>src/main/resources</scanTarget>
<scanTarget>src/main/webapp</scanTarget>
</scanTargets>
<jettyConfig>/Users/dwinsor/neo/neo-js/target/generated-resources/xml/jetty.xml</jettyConfig>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
</connector>
<connector implementation="org.eclipse.jetty.server.ssl.SslSocketConnector">
</connector>
</connectors>
</configuration>
</plugin>
我的問題是,我不再看到那種調試輸出的,我期望看到的。在碼頭7時,我沒有命令mvn碼頭:運行我會看到類似
[email protected]已停止 [email protected]:8080 [email protected] .0.0:8443 + -qtp62871287 {8 < = 5 < = 8/254,0} + -HandlerCollection @ c237b89開始 + -ContextHandlerCollection @ 6d836598開始 | + -JettyWebAppContext @ 17043b2f @ 17043b2f /小工具,[文件:/用戶/ dwinsor /前僱主 ... ... [INFO]啓動Jetty服務器
但是現在,我看到的是最後一個行,[INFO]入門碼頭服務器。 我希望能夠看到所有漂亮的WebAppContext輸出。我已經嘗試了-Dorg.eclipse.jetty.util.log.DEBUG = true和-Dorg.eclipse.jetty.LEVEL = DEBUG,但是在反正之前我們並沒有使用任何一個。我怎樣才能啓用這個輸出?
謝謝。