wjw465150 / run-jetty-run

Automatically exported from code.google.com/p/run-jetty-run
0 stars 0 forks source link

Running webapp with REST API does not scan for resources in project classfiles #149

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Running with eclipse Juno, run-jetty-run version 1.3.3.201203161919
MacOS lion 64 bit, java 1.7.0 (Oracle 64 bit)

I have a simple web application, that uses the jackson library and the 
javax.ws.rs classes to support annotation-driven RESTful API. This runs great 
with a standalone Jetty install or using the 'mvn jetty:run' command. The 
annotated classes are detected:

...
INFO: Provider classes found:
  class com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider
  class com.fasterxml.jackson.jaxrs.json.JsonParseExceptionMapper
  class com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider
  class com.fasterxml.jackson.jaxrs.json.JsonMappingExceptionMapper
Sep 24, 2012 2:15:25 PM 
com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory register
INFO: Registering com.g2llc.dnsa.webservice.resource.DomainFinderResource as a 
root resource class
Sep 24, 2012 2:15:25 PM 
com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory register
INFO: Registering com.g2llc.dnsa.webservice.resource.DomainVerifierResource as 
a root resource class
Sep 24, 2012 2:15:25 PM 
com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory register
INFO: Registering com.g2llc.dnsa.webservice.resource.DomainLookupResource as a 
root resource class
Sep 24, 2012 2:15:25 PM 
com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory register
INFO: Registering 
com.g2llc.dnsa.webservice.resource.LinkedDomainsFinderResource as a root 
resource class
Sep 24, 2012 2:15:25 PM 
com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory register
INFO: Registering 
com.g2llc.service.common.exception.mapper.ServiceExceptionMapper as a provider 
class
...

However, when I try running with the run-jetty-run plugin, these classes aren't 
apparently detected, no such lines appear in the console output and the REST 
endpoints aren't working.
I've verified that the default classpaths are present in the debug 
configuration, in particular dnsa-web-service/target/classes - this directory 
does contain all the expected class files in the expected locations.

This behavior is consistent across several simple webapps I've created just to 
test this issue. How do I proceed?

Original issue reported on code.google.com by sheldonr...@gmail.com on 24 Sep 2012 at 9:22

GoogleCodeExporter commented 9 years ago
I can debug successfully by running 'mvnDebug jetty:run', then attaching 
eclipse to the debug port 8000 on the maven process, FWIW.

Original comment by sheldonr...@gmail.com on 24 Sep 2012 at 10:10