eclipse 中使用maven jetty

1 war包方式部署wep app: web

1)  配置: spring

<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>jetty-maven-plugin</artifactId>
				<version>8.1.0.v20120127</version>
				<configuration>
					<scanIntervalSeconds>10</scanIntervalSeconds>
					<war>./target/spring-0.0.1-SNAPSHOT.war</war>
					<webApp>
						<contextPath>/spring</contextPath>
					</webApp>
					<connectors>
						<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
							<port>9999</port>
							<maxIdleTime>60000</maxIdleTime>
					</connector>
					</connectors>
				</configuration>
				<!-- <executions> <execution> <id>start-jetty</id> <phase>package</phase> 
					<goals> <goal>run</goal> </goals> </execution> </executions> -->
			</plugin>



2) 啓動命令 jetty:run-war


2 exploded 方式部署web app app

1)配置: eclipse

去掉 <war>./target/spring-0.0.1-SNAPSHOT.war</war>

2) 啓動命令 jetty:run maven

相關文章
相關標籤/搜索