2014-03-25 44 views
0

后,我用后续配置的pom.xml为什么码头不启动Mvn的安装

<build> 
     <plugins> 
      <plugin> 
       <groupId>org.mortbay.jetty</groupId> 
       <artifactId>jetty-maven-plugin</artifactId> 
       <version>7.6.14.v20131031</version> 
       <executions> 
        <execution> 
         <id>start-jetty</id> 
         <phase>install</phase> 
         <goals> 
          <goal>run</goal> 
         </goals> 
        </execution> 
       </executions> 
      </plugin> 
     </plugins> 
    </build> 

然后我用mvn clean install,所有建立成功,但码头不启动无法运行。

+0

尝试mvn码头:改为开始。 – user2254180

+0

'jetty:start'可以,但是我会在mvn clean install后使用start – venlentine

回答

0

我发现错误。我的配置错误。 使用这是行!

<build> 
     <plugins> 
      <plugin> 
       <groupId>org.mortbay.jetty</groupId> 
       <artifactId>jetty-maven-plugin</artifactId> 
       <version>8.1.0.v20120127</version> 
       <configuration> 
        <scanIntervalSeconds>10</scanIntervalSeconds> 
        <webApp> 
         <contextPath>/mideaAdmin</contextPath> 
        </webApp> 
        <connectors> 
         <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector"> 
          <port>9999</port> 
          <maxIdleTime>60000</maxIdleTime> 
         </connector> 
        </connectors> 
        <stopPort>8191</stopPort> 
        <stopKey>ts</stopKey> 
       </configuration> 
       <executions> 
        <execution> 
         <id>start-jetty</id> 
         <phase>install</phase> 
         <goals> 
          <goal>run</goal> 
         </goals> 
        </execution> 
       </executions> 
      </plugin> 
     </plugins> 
     <finalName>mideaAdmin</finalName> 
    </build>