maven 实战2-创建Web应用
创建应用
mvn archetype:create -DgroupId=com.anncsr -DartifactId=anncsr -DpackageName=com.anncsr -DarchetypeArtifactId=maven-archetype-webapp
配置jetty插件
<build>
<finalName>anncsr</finalName>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
</plugin>
</plugins>
</build>
配置J2EE依赖
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_2.4_spec</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
配置setting.xml
<pluginGroups>
<pluginGroup>org.mortbay.jetty</pluginGroup>
</pluginGroups>
部署
mvn jetty:run