對於Tomcat,下面添加行成你的pom.xml
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<warName>test-ws</warName>
<dependentWarExcludes></dependentWarExcludes>
<webappDirectory>
${env.CATALINA_HOME}/webapps/test-ws
</webappDirectory>
</configuration>
</plugin>
</plugins>
</build>
「我想用球衣servlet來擔任我的服務。」
對於新澤西州的Servlet添加此行到您的pom.xml
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.1.1-ea</version>
</dependency>
更多依賴球衣下面添加吉文斯是到您的pom.xml
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>1.1.1-ea</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
<version>1.1.1-ea</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.1.1-ea</version>
</dependency>
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-spring</artifactId>
<version>1.1.1-ea</version>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1</version>
</dependency>