2012-01-11 9 views
0

は正しいMavenを書くためにどのように避ける使用は

にReleated POMは、コネクタの廃止されたメソッド/タグを使用しないでくださいのようにneedClientAuthまたはキーストア?非推奨の方法の使用に

例:Mavenの構成構造を介し

 <plugin> 
     <groupId>org.mortbay.jetty</groupId> 
     <artifactId>jetty-maven-plugin</artifactId> 
     <!-- see http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin --> 
     <version>8.0.4.v20111024</version> 
     <!-- see http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.mortbay.jetty%22%20AND%20a%3A%22jetty-maven-plugin%22 --> 
     <dependencies> 
      <!--[...]--> 
     </dependencies> 
     <configuration> 
      <webAppXml>src/main/resources/jetty-Login.xml</webAppXml> 
      <scanIntervalSeconds>5</scanIntervalSeconds> 
      <webAppConfig> 
      <contextPath>/MyApp</contextPath> 
      </webAppConfig> 
      <connectors> 
      <connector implementation="org.eclipse.jetty.server.bio.SocketConnector"> 
       <port>8080</port> 
      </connector> 
      <connector implementation="org.eclipse.jetty.server.ssl.SslSocketConnector"> 
       <port>8443</port> 
       <password>changeit</password> 
       <wantClientAuth>true</wantClientAuth><!-- deprecated! --> 
       <needClientAuth>false</needClientAuth><!-- deprecated! --> 
       <keystore>/my/path/to/java/keystore</keystore><!-- deprecated! --> 
      </connector> 
      </connectors> 
     </configuration> 
     </plugin> 
    </plugins> 

答えて

1

カスタムSSLの設定が不可能です。 これは、SslSocketConnectorコンストラクタにSslContextFactory要件が導入され、サーバー側でSSLセキュリティの問題がいくつか強化されているためです。

Mavenは、pom.xmlの構造体を使用する場合にのみ、デフォルトのコンストラクタからオブジェクトを構築できます。

<jettyXml>要素を使用して変更をブリッジする必要があります。 jetty-ssl.xmlのコピーを配布から取り出し、$ {project.basedir} /src/main/config/jetty-ssl.xmlに入れて、次の構成ブロックを使用します。

<plugin> 
    <groupId>org.mortbay.jetty</groupId> 
    <artifactId>jetty-maven-plugin</artifactId> 
    <version>${jetty-version}</version> 
    <configuration> 
     <scanIntervalSeconds>5</scanIntervalSeconds> 
     <webAppConfig> 
     <contextPath>/MyApp</contextPath> 
     </webAppConfig> 
     <jettyXml>src/main/config/jetty-ssl.xml</jettyXml> 
     <connectors> 
     <connector implementation="org.eclipse.jetty.server.bio.SocketConnector"> 
      <port>8080</port> 
     </connector> 
     </connectors> 
    </configuration> 
    </plugin> 
関連する問題