[ 
https://issues.apache.org/jira/browse/MNG-6519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Karl Heinz Marbaise closed MNG-6519.
------------------------------------
    Resolution: Not A Problem

Please don't use JIRA as a forum. Please ask in the user mailing list or on 
Stackoverflow for such things....

> Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
> ---------------------------------------------------------------------
>
>                 Key: MNG-6519
>                 URL: https://issues.apache.org/jira/browse/MNG-6519
>             Project: Maven
>          Issue Type: Task
>          Components: Plugin API, POM
>            Reporter: Patrik Ek
>            Priority: Major
>
> Hey.
> So, I'm trying to make a Web Application and a maven client that uses it. 
> However, I get the "Failed to execute goal 
> org.codehaus.mojo:exec-maven-plugin:1.2.1:exec" when ever I run it. Now when 
> I try to do my teacher's example, I get the same problem. She doesn't seem to 
> understand what the problem is, so I'm asking you all.
> This is my pom.xml file:
> {code:java}
> <?xml version="1.0" encoding="UTF-8"?>
> <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.nackademin.systemintegration</groupId>
> <artifactId>WebApplicationClientDemo2</artifactId>
> <version>1.0-SNAPSHOT</version>
> <packaging>jar</packaging>
> <properties>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> <maven.compiler.source>1.8</maven.compiler.source>
> <maven.compiler.target>1.8</maven.compiler.target>
> </properties>
> <dependencies>
> <dependency>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jersey-client</artifactId>
> <version>1.19.4</version>
> </dependency>
> <dependency>
> <groupId>javax</groupId>
> <artifactId>javaee-web-api</artifactId>
> <version>7.0</version>
> <type>jar</type>
> </dependency>
> <dependency>
> <groupId>com.sun.jersey</groupId>
> <artifactId>jersey-json</artifactId>
> <version>1.17.1</version>
> </dependency>
> <dependency>
> <groupId>com.google.code.gson</groupId>
> <artifactId>gson</artifactId>
> <version>2.8.2</version>
> </dependency>
> </dependencies>
> </project>
> {code}
> This is the Web Application code I made:
> {code:java}
> BookDao bookdao = new BookDao();
> @GET
> @Path("/books")
> @Produces(MediaType.APPLICATION_XML)
> public List<Book> getBooks() {
> return bookdao.getAllBooks();
> }
> {code}
> And this is my maven client:
> {code:java}
> String xmlString = service.path("rest")
> .path("BookService/books").accept(MediaType.APPLICATION_XML).get(String.class);
> System.out.println(xmlString);
> System.out.println();
> Book[] bookArray = service.path("rest")
> .path("BookService/books").accept(MediaType.APPLICATION_XML).get(Book[].class);
> for (Book b : bookArray) {
> System.out.println("Book id: " + b.getId() + " title: " + b.getTitle() + " 
> author: " + b.getAuthor());
> }
> {code}
> Do anyone know what the crap is the problem? Also, before anyone ask, yes, 
> I've been on stackowerflow and search through google. I can't find anything 
> that works.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to