WebProject folder structure
Pom/pom.xml
<project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance" xsi: schemalocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >< modelversion>4.0.0</modelversion><groupid>com.demo</groupid><artifactid>pom</ artifactid><version>0.0.1-snapshot</version><packaging>pom</packaging>< Properties></properties><dependencymanagement><dependencies><dependency><groupid >junit</groupId><artifactId>junit</artifactId><version>4.10</version>< Scope>test</scope></dependency><dependency><groupid>javax.servlet</groupid> <artifactid>servlet-api</artifactid><version>2.4</version><scope>provided</ Scope></dependency><dependency><groupid>javax.servlet.jsp</groupid><artifactid >jsp-api</artifactid><versiOn>2.0</version><scope>provided</scope></dependency><dependency><groupid >org.springframework</groupid><artifactid>spring-webmvc</artifactid><version>3.0.7. release</version></dependency><dependency><groupid>javax.servlet</groupid>< Artifactid>jstl</artifactid><version>1.2</version></dependency></dependencies ></dependencyManagement><modules><module>user-manage</module></modules>< build><pluginmanagement><plugins><plugin><groupid>org.apache.maven.plugins</ groupid><artifactid>maven-compiler-plugin</artifactid><configuration><source>1.5 </source><target>1.5</target></configuration></plugin><plugin><groupid >org.apache.maven.plugins</groupId><artifactId>maven-resources-plugin</artifactId>< configuration><encoding&Gt Utf-8</encoding></configuration></plugin></plugins></pluginmanagement></build ></project>
User-manage/pom.xml
<project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance" xsi: schemalocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >< Modelversion>4.0.0</modelversion><parent><groupid>com.demo</groupid><artifactid >pom</artifactId><version>0.0.1-SNAPSHOT</version></parent><artifactId> user-manage</artifactid><packaging>war</packaging><dependencies><dependency>< Groupid>junit</groupid><artifactid>junit</artifactid></dependency><dependency ><groupid>javax.servlet</groupid><artifactid>servlet-api</artifactid></ dependency><dependency><groupid>javax.servlet.jsp</groupid><artifactid>jsp-api</ artifactid></dependency><dependency><groupid>org.springframework</groupid>< Artifactid>spring-webmvc</artifactiD></dependency><dependency><groupid>javax.servlet</groupid><artifactid>jstl </artifactId></dependency></dependencies><build><plugins><plugin>< groupid>org.mortbay.jetty</groupid><artifactid>jetty-maven-plugin</artifactid>< configuration><scanintervalseconds>10</scanintervalseconds><webapp><contextpath>/ Usermanage</contextpath></webapp><connectors><connector implementation= " Org.eclipse.jetty.server.nio.SelectChannelConnector "><port>9070</port><maxidletime>60000 </maxidletime></connector></connectors></configuration><executions><execution ><phase>package</phase><goals><goal>run</goal></goals></execution ></executions></plugin></plugins></build></project>
Execute command:
MVN Clean Package
Access URL:
Localhost:9070/usermanage/user/list
SOURCE download
Project Building maven: 8.maven announces WebProject and user management demo based on spring Mvc,jetty implementation