欢迎光临
我的个人博客

maven工程使用jetty插件

1.在pom.xml中添加代码

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${jdk.version}</source>
					<target>${jdk.version}</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
		    <plugin>
		      <groupId>org.eclipse.jetty</groupId>
		      <artifactId>jetty-maven-plugin</artifactId>
		      <version>9.2.8.v20150217</version>
			  <configuration>      
				   <reload>manual</reload>
				   <httpConnector>
				     <port>80</port>
				   </httpConnector>   
			  </configuration>
		    </plugin>
		</plugins>
	</build>

2.在eclipse中添加启动
点击debug按钮选择debug configurations
Base directory中填写${workspace_loc:/springblade}
Goals中填写jetty:run
source中添加对应工程

转载请标明来源:ibear » maven工程使用jetty插件

分享到:更多 ()

Where there is a will there is a way

我的新浪微博