maven專案中jetty執行配置
阿新 • • 發佈:2019-02-09
<plugins>
<!--編譯外掛-->
<plugin><artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>GBK</encoding>
</configuration>
</plugin>
<!--打包外掛-->
<plugin><groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
</plugin>
<!--jetty日期外掛-->
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.26</version>
<configuration>
<contextPath>/</contextPath>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8080</port>
</connector>
</connectors>
<scanIntervalSeconds>3</scanIntervalSeconds>
<!--資源匹配配置 可以不要-->
<scanTargetPatterns><scanTargetPattern>
<directory>src/main/webapp</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</scanTargetPattern>
</scanTargetPatterns>
<!--系統屬性配置 可以不要-->
<systemProperties><systemProperty>
<name>org.apache.commons.logging.LogFactory</name>
<value>org.apache.commons.logging.impl.LogFactoryImpl</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
</plugins>