2011-06-23 65 views
2

我们正在使用maven Jetty插件进行开发。 我总是用码头maven依赖关系

<jetty.version>7.2.2.v20101205</jetty.version> 

<plugin> 
    <groupId>org.mortbay.jetty</groupId> 
    <artifactId>jetty-maven-plugin</artifactId> 
    <version>${jetty.version}</version> 
     <configuration>...</configuration> 
</plugin> 

现在我想添加SSL连接器,并尝试添加

<dependency> 
    <groupId>org.mortbay.jetty</groupId> 
    <artifactId>jetty-ssl</artifactId> 
    <version>${jetty.version}</version> 
</dependency> 

这是不行的,依赖没有被发现。现在我看到码头移动到了日食。 但我无法在eclipse存储库中找到任何jetty-ssl依赖项。现在我迷路了。 在我看来,一切都搞砸了。我不知道在哪里寻找我想要包含在我的POM中的依赖关系。

所以:版本7.x的“官方”maven jetty仓库在哪里?

回答

3

下面是我的工作原理:更新连接器实现类以使用eclipse名称,然后删除额外的依赖项部分。所以,你的配置部分应该看起来像这样:

<configuration> 
    <connectors> 
    <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector"> 
     <port>8080</port> 
    </connector> 
    <connector implementation="org.eclipse.jetty.server.ssl.SslSocketConnector"> 
     <port>8443</port> 
     <keystore>jetty-ssl.keystore</keystore> 
     <password>mypassword</password> 
     <keyPassword>mypassword</keyPassword> 
    </connector> 
    </connectors> 
... 
</configuration> 
1

如果你看here你可以看到jetty-ssl依赖关系对于mortbay有不同的版本号。从this answer看来,你不需要eclipse上版本的jetty-ssl版本。我相信日食现在是正式版本。

+0

你和我一样无知,不是吗? :-)我喜欢码头,但现在一切都搞砸了。 – Janning