1

My app needs to serve a servlet like this:

serve("_ah/admin/datastore*").with(DatastoreViewerServlet.class); 

However, this DatastoreViewerServlet is located in a runtime sdk located in my machine:

some_path/lib/shared/appengine-local-runtime-shared.jar

So how can I load this jar when I run my application. I am using maven, and when I run my application I just do mvn gwt:run

noahlz
  • 10,202
  • 7
  • 56
  • 75
quarks
  • 33,478
  • 73
  • 290
  • 513

1 Answers1

2

You can use systemPath tag inside dependency tag. Please try the following.

<dependency>
  <groupId>com.google.gae</groupId>
  <artifactId>appengine-local-runtime-shared</artifactId>
  <scope>system</scope>
  <systemPath>some_path/lib/shared/appengine-local-runtime-shared.jar</systemPath>
</dependency>
seenukarthi
  • 8,241
  • 10
  • 47
  • 68
  • Right now I'm still having an issue with serving it with 'serve' method – quarks May 17 '13 at 18:22
  • OK, if I pust this dependency, and removed serve("/_ah/admin/datastore") then access the datastore viewer like the usual way: here's what I get: Could not find resource for relative : /_ah/admin/datastore of full path: http://127.0.0.1:8888/_ah/admin/datastore – quarks May 17 '13 at 19:49
  • I didn't worked on GWT much apart from the example application eclipse created so I'm guesing. If _ah is not your application context root then the context path is missing while looking up the resource. Please post a new question you will get help quicker. – seenukarthi May 18 '13 at 02:24
  • 1
    Don't use System scope. Install the dependency with `install:install-file` See: http://stackoverflow.com/questions/3642023/having-a-3rd-party-jar-included-in-maven-shaded-jar-without-adding-it-to-local-r – noahlz May 20 '13 at 02:49