使用archtype jersey-quickstart-webapp Ver 1.19.1构建REST Web应用程序时pom.xml出错

时间:2016-05-07 09:05:51

标签: java xml rest maven jersey

<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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>java.rest</groupId> <artifactId>RESTFULApp2</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <name>RESTFULApp2 Jersey Webapp</name> <build> <finalName>RESTFULApp2</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <inherited>true</inherited> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <!-- Run the application using "mvn embedded-glassfish:run" --> <plugin> <groupId>org.glassfish</groupId> <artifactId>maven-embedded-glassfish-plugin</artifactId> <version>${glassfish.version}</version> <configuration> <goalPrefix>embedded-glassfish</goalPrefix> <app>C:/Users/PATHAK/workspace/target/${project.build.finalName}.war</app> <autoDelete>true</autoDelete> <port>8080</port> </configuration> <dependencies> <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-servlet</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.0.1</version> </dependency> </dependencies> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-servlet</artifactId> <version>${jersey.version}</version> </dependency> <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-json</artifactId> <version>${jersey.version}</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.2</version> <scope>test</scope> </dependency> <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-client</artifactId> <version>${jersey.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.glassfish.extras</groupId> <artifactId>glassfish-embedded-web</artifactId> <version>${glassfish.version}</version> <scope>test</scope> </dependency> </dependencies> <properties> <jersey.version>1.20-SNAPSHOT</jersey.version> <glassfish.version>3.1.1</glassfish.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> </project> enter image description here

我无法在glassfish 4上使用archtype jersey-quickstart-webapp Ver 1.19.1部署Rest应用程序版本。弹出的对话框说无法部署。我认为这是因为POM.xml中的错误。

enter image description here

0 个答案:

没有答案