On 05/15/2013 10:34 PM, Denis Haskin wrote:
> Thanks -- yeah, maven is really good at hiding the actual error from
> you. Seems to have been engineered specifically to do that.
It should be less frustrating once we eliminate all the clever hacks
from the project configuration and use it only for dependency
management, compilation, and packaging in a completely standard way.
> In any event, I found where the GTFS file is referenced and have swapped
> in another one (trimet!) and so trying that now.
Great, let me know if you run into any problems. And don't hesitate to
work with the master branch, it should certainly be stable enough for
experimentation.
> What we found on OBA is that integration tests had to rely only on
> resources that were bundled with the project. A pain, especially with
> resources like GTFS files.
We're pulling a stress testing / profiling module completely out of the
Maven build (~2 hours of pseudorandom requests against each
commit). This way we can make the build less brittle by including all
the (relatively smaller) unit test resources/fixtures in the repo, still
getting constant quality feedback.
> One thing to maybe consider for servlet containers is to use jetty;
> there's a decent maven jetty plugin and so maven handles downloading it
> for you. Worked pretty well for us on OBA (well, hat tip to Brian who
> set it up like that in the first place).
I was just working through this yesterday. In my opinion, deploying a
simple REST interface like OTP's into an external Servlet/JSP container
like Tomcat seems like overkill, let alone "Enterprise" application
servers like Glassfish.
I had already started along the path of embedding Jetty into OTP when I
realized there was another option: Grizzly, which is the HTTP
abstraction layer of Glassfish, can interface directly with Jersey. The
resulting class is nice and succinct:
https://github.com/openplans/OpenTripPlanner/blob/master/opentripplanner-api-webapp/src/main/java/org/opentripplanner/api/servlet/GrizzlyServer.java
From my perspective, this is what the future of OTP looks like: self
contained and lightweight.
-Andrew