2011-07-27 7 views
2

私はJettyを私のアプリケーションに埋め込みたいと思っています。 Mavenのアーティファクトはjboss-jettyですか?そうでない場合、それは何ですか?桟橋メイフェアアーティファクトはボスボルトですか?

+1

私はあなたが言っていることを知っていると思いますか?私はトヨタを持っていたいと思うが、それは2つまたは4つの足を持っているのですか?私はあなたがmaven-jetty-pluginの後にいると思うhttp://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin – Shahzeb

答えて

2

を読んではいけません。

扇風機7(org.eclipse.jetty)にはこのようなアーティファクトがないため、異なるアーティファクト(少なくともjetty-serverおよびjetty-servlet)の組み合わせを使用する必要があります。

1

は、なぜあなたは特別なjetty-embeddedアーティファクトがある桟橋6(org.mortbay.jetty)についてはMaven Jetty Plugin Configuration Guide

+0

このガイドはMavenプラグインのためのものであり、アーティファクトに関する情報を提供していません。アプリケーションにJettyを埋め込むために必要です。 –

0

は、あなただけの下にdepandencyを追加し、残りはあなたが発火するに従って

<plugin> 
      <groupId>org.mortbay.jetty</groupId> 
      <artifactId>jetty-maven-plugin</artifactId> 
      <version>${jetty.version}</version> 
      <configuration> 
       <webAppSourceDirectory>WebContent</webAppSourceDirectory> 
       <!-- <classesDirectory>WebContent/WEB-INF/classes</classesDirectory> --> 
       <!-- Redeploy every 1 seconds if changes are detected, 0 for no automatic 
        redeployment --> 
       <scanIntervalSeconds>0</scanIntervalSeconds> 
       <!-- reload manually by hitting enter on console --> 
       <reload>manual</reload> 
       <webApp> 
        <contextPath>/</contextPath> 
        <descriptor>WebContent/WEB-INF/web.xml</descriptor> 
       </webApp> 
       <connectors> 
        <connector implementation="org.eclipse.jetty.server.bio.SocketConnector"> 
         <port>8080</port> 
         <maxIdleTime>600000</maxIdleTime> 
        </connector> 
       </connectors> 
      </configuration> 
     </plugin> 

変更値を「MVNのインストール」時にダウンロードされます。

乾杯!

関連する問題