maven pom jetty run

阅读更多

 

构建一个 maven jetty 项目

 demo下载

 

1. 配置 jetty 插件在pom中


	4.0.0

	com.curiousby.cn
	MavenJettyRunDemo
	0.0.1-SNAPSHOT
	war

	MavenJettyRunDemo
	http://maven.apache.org

	
		UTF-8
	

	
		
			junit
			junit
			3.8.1
			test
		
	


	
		
			
				org.apache.maven.plugins
				maven-compiler-plugin
				3.3
				
					1.7
					1.7
				
			
			
				org.apache.maven.plugins
				maven-surefire-plugin
				2.4.2
				
					false
					true
					${argLine}
				
			
			
				org.mortbay.jetty
				jetty-maven-plugin
				7.1.6.v20100715
				
					
						/jettyTest
					
					
						
							8084
							60000
						
					
				
			
		
	


  

2. web .xml 



 
	
		index.jsp
	
  

 

3. index.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>




Insert title here



Hello world!

 

4. 运行 命令 maven bulid  -> mvn jetty:run 

 

 

或者  配置 

 


maven pom jetty run_第1张图片
 

 

 

5.测试 


maven pom jetty run_第2张图片
 

 6. 删除进程

在win 中 jetty 启动后进程未删除,导致后期的jetty  run 启动不起来,所以要删除 进程

 

maven pom jetty run_第3张图片
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

捐助开发者

在兴趣的驱动下,写一个免费的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(右上角的爱心标志,支持支付宝和PayPal捐助),没钱捧个人场,谢谢各位。


maven pom jetty run_第4张图片maven pom jetty run_第5张图片maven pom jetty run_第6张图片
 
 
 谢谢您的赞助,我会做的更好!

 

 

 

 

  • maven pom jetty run_第7张图片
  • 大小: 134.9 KB
  • maven pom jetty run_第8张图片
  • 大小: 63.7 KB
  • maven pom jetty run_第9张图片
  • 大小: 1.4 KB
  • maven pom jetty run_第10张图片
  • 大小: 6.8 KB
  • 查看图片附件

你可能感兴趣的:(maven,pom,jetty,run)