2014-09-27 55 views
0

这工作得很好:如何在maven中使用jetty 9插件?

<plugin>              
    <groupId>org.mortbay.jetty</groupId>      
    <artifactId>jetty-maven-plugin</artifactId>    
    <version>8.1.16.v20140903</version>      
    <configuration>           
     <webApp>            
      <contextPath>/${project.artifactId}</contextPath> 
     </webApp>            
     <stopKey>STOP</stopKey>        
     <stopPort>9999</stopPort>        
     <scanIntervalSeconds>5</scanIntervalSeconds>   
    </configuration>           
</plugin> 

但我需要使用的Servlet 3.1,所以我需要码头9.但在Maven仓库中我找不到它。我如何获得它?我使用IntelliJ作为IDE。

回答

1

该项目已移至Eclipse Foundation。现在,它有不同的groupId:

<plugin> 
    <groupId>org.eclipse.jetty</groupId> 
    <artifactId>jetty-maven-plugin</artifactId> 
    <version>9.2.3.v20140905</version> 
    ... 
</plugin> 
+0

谢谢,但这不是插件?我希望能够在IntelliJ中运行jetty,添加此依赖不会有帮助。 – 2014-09-28 03:30:32

+1

我刚刚修改了我的上述帖子。不要将它作为依赖项添加,只需用它替换当前的插件定义(更改groupId和version)。如果它没有帮助,你能否详细说明一下你在这方面使用IntelliJ的准确程度? – 2014-09-28 06:11:14

+0

你好,它没有。在IntelliJ的右侧,我看到了maven的可用生命周期和插件。当我使用我有问题时,有多个码头选项可用,如运行,运行战等。有了这个没有什么.. – 2014-09-28 07:34:06

0

尝试,包括在你的POM依赖像“版本”的标签,

<dependency> 
    <groupId>org.eclipse.jetty</groupId> 
    <artifactId>jetty-maven-plugin</artifactId> 
    <version>9.2.3.v20140905</version> 
</dependency> 

而且我不知道为什么你不能在Maven的回购找到它。就在这里,

http://mvnrepository.com/artifact/org.eclipse.jetty/jetty-maven-plugin/9.2.3.v20140905

希望它可以帮助!

+0

谢谢,但这不是插件?我希望能够在IntelliJ中运行jetty,添加此依赖不会有帮助。 – 2014-09-28 03:32:23

相关问题