You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by dorwin <do...@gmail.com> on 2012/07/30 01:10:34 UTC

Help with testing jax-rs

Hello,

I'm having a few problems getting testing working with tomee. I'm not used
to maven, so I'm doing things by hand. I downloaed tomee, set it up in
eclipse, wrote a small jax-rs pojo, and tested that it works by hand. I
tried writing a test for it but have only been successful if I download all
of jetty and add it to my classpath.

is there a system of testing using only the included components? I went
through the rest example and decided to try following its example. I set up
the test and it failed to run because i didn't have embedded tomee. After a
bunch of google searching, i found a maven repository that had the jar. I
downloaded it and added it to my classpath. It failed because I didn't have
velocity. I downloaded velocity. It failed because I didn't have apache juli
logging....

I scoured the web looking for an all-in-one embedded tomee jar I'd heard
mentioned but didn't find it.

Are there instructions anywhere for how to do this? I really didn't want to
have to learn to use maven to do this. I downloaded and installed the
examples project, but even after running the test and looking at the
project, I wasn't easily able to see what jars came with tomee and which I
needed to add manually.

Thanks for any help!

Dorwin
(PS to make things worse I came across the localcounduit method of testing
which seems to only be usable with the unreleases 2.6.2 version of CXF. It
was exactly what I wanted, though--no server startup needed, but full
protocol implementation)



--
View this message in context: http://openejb.979440.n4.nabble.com/Help-with-testing-jax-rs-tp4656571.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Help with testing jax-rs

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

there is a jar with the classifier -uber: this is the all in one jar:
https://repository.apache.org/content/groups/snapshots/org/apache/openejb/tomee-embedded/1.1.0-SNAPSHOT/tomee-embedded-1.1.0-20120728.040754-83-uber.jar

- Romain


2012/7/30 dorwin <do...@gmail.com>

> I got the tomee-embedded-1.0.0.jar to work.
>
> I had to add:
>   commons-io-2.4.jar
>   tomcat-juli-7.0.27.jar
>   velocity-1.6.4.jar
>
> The only place I found tomee-embedded was:
> http://mvnrepository.com/artifact/org.apache.openejb/tomee-embedded
>
> You can also get it by downloading the examples for tomee and pulling in
> all
> the maven dependencies.
>
> I found an all-in-one embedded jetty, but not sure I could get CDI to work
> with it, so I'm glad I got the embedded TomEE to work with a webapp.
>
> Thanks for all the hard work going into TomEE!
>
> Dorwin
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Help-with-testing-jax-rs-tp4656571p4656572.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Help with testing jax-rs

Posted by dorwin <do...@gmail.com>.
I got the tomee-embedded-1.0.0.jar to work.

I had to add: 
  commons-io-2.4.jar
  tomcat-juli-7.0.27.jar
  velocity-1.6.4.jar

The only place I found tomee-embedded was:
http://mvnrepository.com/artifact/org.apache.openejb/tomee-embedded

You can also get it by downloading the examples for tomee and pulling in all
the maven dependencies.

I found an all-in-one embedded jetty, but not sure I could get CDI to work
with it, so I'm glad I got the embedded TomEE to work with a webapp.

Thanks for all the hard work going into TomEE!

Dorwin



--
View this message in context: http://openejb.979440.n4.nabble.com/Help-with-testing-jax-rs-tp4656571p4656572.html
Sent from the OpenEJB User mailing list archive at Nabble.com.