Maven Jetty Plugin執行配置jetty:run

♂啊哈發表於2016-04-27

如果這個工程是標準的maven-webapp那麼基本上不用修改,直接執行jetty:run就可以執行。

 

但是有時候會報錯說

 

[ERROR] No plugin found for prefix 'jetty' in the current project and in the plu
gin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repo
sitories [local (C:\Documents and Settings\reymont.li\.m2\repository), central (
http://repo.maven.apache.org/maven2)] -> [Help 1]

 

在pom.xml的project.build節點下新增 

 

<plugins>
 <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>maven-jetty-plugin</artifactId>
        <version>6.1.10</version>
        
  </plugin>
  </plugins>

相關文章