users@jersey.java.net

[Jersey] Re: Deploying on Jetty

From: Dário Abdulrehman <dario.rehman_at_gmail.com>
Date: Tue, 24 May 2011 17:36:33 +0100

I added the maven-jetty-plugin to the pom as in your example but I get
an error when running mvn jetty:run:

java.lang.ClassNotFoundException:
com.sun.jersey.spi.container.servlet.ServletContainer

Also I added the configuration manually to the pom. If I add the
dependency through netbeans Libraries -> Add dependency it adds the
plugin as a <dependency></dependency> and not as a <plugin></plugin>.
I don't know if this is important.

On Tue, May 24, 2011 at 4:01 PM, Pavel Bucek <pavel.bucek_at_oracle.com> wrote:
> Hello,
>
> yes, it is possible, see helloworld-webapp sample [1] and execute mvn clean
> package jetty:run.
>
> Jetty:run doesn't work out of the box, it must be configured, see pom file
> of that sample.
>
> Regards,
> Pavel
>
> [1]
> http://download.java.net/maven/2/com/sun/jersey/samples/helloworld-webapp/1.7/helloworld-webapp-1.7-project.zip
>
> On 5/24/11 4:56 PM, Dário Abdulrehman wrote:
>>
>> I would include some services in a VM but glassfish is very big and I
>> would like to keep the VM as small as possible.
>> Is it possible to deploy the web services on the Jetty web server?
>>
>> I tried to add jetty to the project dependencies and then running mvn
>> jetty:run but I get a
>> [ERROR] No plugin found for prefix 'jetty' in the current project and
>> in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] ...
>>
>>
>> Is it possible to deploy a Jersey web services on Jetty?
>>
>> Thanks.
>>
>
>