Eclipse: How to build a web project with Eclipse And Maven

阅读更多

1 Using Eclipse

     1) Create project using archetype: maven-archetype-webapp
Eclipse: How to build a web project with Eclipse And Maven_第1张图片


Eclipse: How to build a web project with Eclipse And Maven_第2张图片
 
Eclipse: How to build a web project with Eclipse And Maven_第3张图片
 
Eclipse: How to build a web project with Eclipse And Maven_第4张图片
    2) Update Build Path Using JDK-1.7 and Compiler Level to 1.7

    3) Add "javax.servlet" dependency in pom.xml

    4) Add "jetty" build into pom.xml for validation that web-project successfully created.


	4.0.0
	edu.xmu.project
	webapp
	war
	0.0.1-SNAPSHOT
	webapp Maven Webapp
	http://maven.apache.org

	
		9.2.0.v20140526
	
	
		
			javax.servlet
			servlet-api
			2.5
		
	
	
		webapp
		
			
				org.eclipse.jetty
				jetty-maven-plugin
				${jetty.version}
				
					
						/jetty
					
				
			
		
	

   5)  Create jetty run goal
Eclipse: How to build a web project with Eclipse And Maven_第5张图片
    6) Test result
Eclipse: How to build a web project with Eclipse And Maven_第6张图片
   7) Final Project Heirarchy
Eclipse: How to build a web project with Eclipse And Maven_第7张图片

 

 

Reference Linkes:

1) http://www.mkyong.com/maven/how-to-create-a-web-application-project-with-maven/

  • Eclipse: How to build a web project with Eclipse And Maven_第8张图片
  • 大小: 36.9 KB
  • Eclipse: How to build a web project with Eclipse And Maven_第9张图片
  • 大小: 50.5 KB
  • Eclipse: How to build a web project with Eclipse And Maven_第10张图片
  • 大小: 57.1 KB
  • Eclipse: How to build a web project with Eclipse And Maven_第11张图片
  • 大小: 53.4 KB
  • Eclipse: How to build a web project with Eclipse And Maven_第12张图片
  • 大小: 23.8 KB
  • Eclipse: How to build a web project with Eclipse And Maven_第13张图片
  • 大小: 109.7 KB
  • Eclipse: How to build a web project with Eclipse And Maven_第14张图片
  • 大小: 48.7 KB
  • 查看图片附件

你可能感兴趣的:(Eclipse,Web,Project,Maven)