users@jersey.java.net

[Jersey] Re: Error running simple-service

From: Kingsley Osime <geekinthelead_at_gmail.com>
Date: Sun, 14 Jul 2013 23:36:18 +0100

Thanks once again Daniel. but really none of anything I have tried works as it is supposed to. mvn test exec:java does not display the results as the example specified and neither does mvn clean test (or whatever). The only thing that comes close is mvn install exec:java and even then with a bunch of errors! what a joke! and then they give you some rubbish mailing list and tell you to raise the issue in Jira and when you do all that no one even bothers to come back to you!

How do they expect people to master this stuff when things don’t work as they should?? what a bunch of jokers!!!

From: Daniel Trebbien
Sent: Tuesday, June 18, 2013 12:24 PM
To: Kingsley Osime
Cc: users_at_jersey.java.net
Subject: Re: Error running simple-service

Actually, I was wrong about the problem being that the project artifact was not installed into the local Maven cache. The problem is actually that the project was cleaned, so the compiled classes were deleted. mvn install has to first compile the sources, so that's why it appears that mvn install fixes the problem.

You can just run: mvn test exec:java
This won't install the project artifact into the local Maven cache.


On Jun 17, 2013, at 11:40 PM, Kingsley Osime wrote:


  Thanks for your response Daniel. Is there no way we can change this? I also remember reading somewhere on stack the mvn install was a command to be used sparingly?

  cheers

  From: Daniel Trebbien
  Sent: Tuesday, June 18, 2013 12:31 AM
  To: kingsley osime
  Cc: users_at_jersey.java.net
  Subject: Re: Error running simple-service

  Right, the Getting Started guide does not say to do this step, but in my humble opinion it should. Instead of saying to run mvn clean exec:java, I think it should say mvn install exec:java.

  I was also following the Getting Started guide precisely when I encountered the "java.lang.ClassNotFoundException: com.example.Main" error. I figured that it was because the simple-service's artifact had not been installed into the local Maven cache yet. mvn install is just something that you are familiar with if you have used Maven before.

  Hope that helps,

  Daniel


  On Jun 16, 2013, at 10:08 PM, kingsley osime wrote:


    Hello Daniel,

    I am trying to follow the jersey user guide precisely and there is nowhere it specifies mvn install before the mvn clean exec:java command.

    can you please elaborate?

    Thanks