以自己之前寫的mgblog項目為例,加入jetty容器插件來運作,并釋出到私服中。
Pom.xml中配置代碼:
<span style="white-space:pre"> </span><plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.6</version>
<configuration>
<encoding>UTF-8</encoding>
<scanIntervalSeconds>10</scanIntervalSeconds>
<contextPath>mgblog</contextPath>
</configuration>
</plugin>
還有很多屬性可以配置,這裡就不詳細介紹了。具體推薦去學習一下jetty。
運作mvn jetty:run