| 
 | 
 
 
 楼主 |
发表于 2017-5-15 09:25| 字数 1,343 
|
显示全部楼层
 
 
 
maven jetty:run运行时报错: 
No plugin found for prefix 'jetty' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (D:\maven\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1] 
 
原因:在pom文件中加入 
<build> 
          <plugins> 
                  <plugin>   
                <groupId>org.mortbay.jetty</groupId>   
                <artifactId>jetty-maven-plugin</artifactId>   
                <configuration>   
                    <webApp>   
                        <contextPath>/</contextPath>   
                    </webApp>   
                    <stopKey>webx</stopKey>   
                    <stopPort>9999</stopPort>   
                    <connectors>   
                        <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">   
                            <port>8081</port>   
                            <maxIdleTime>60000</maxIdleTime>   
                        </connector>   
                    </connectors>   
                    <requestLog implementation="org.eclipse.jetty.server.NCSARequestLog">   
                        <filename>target/access.log</filename>   
                        <retainDays>90</retainDays>   
                        <append>false</append>   
                        <extended>false</extended>   
                        <logTimeZone>GMT+8:00</logTimeZone>   
                    </requestLog>   
                    <systemProperties>   
                        <systemProperty>   
                            <name>productionMode</name>   
                            <value>${productionMode}</value>   
                        </systemProperty>   
                    </systemProperties>   
                </configuration>   
            </plugin>   
          </plugins> 
  </build> |   
 
 
 
 |