2013-05-16 26 views
1

我的應用程序需要服務這樣一個servlet:負載罐子到項目與Maven

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

然而,這DatastoreViewerServlet位於坐落在我的機器上運行時SDK:

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

那麼如何我可以在運行我的應用程序時加載這個jar文件。我正在使用maven,當我運行我的應用程序時,我只是做mvn gwt:run

回答

2

您可以在依賴關係標記中使用systemPath標記。請嘗試以下。

<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> 
+0

很酷,看來你以前做過這個嗎?你有嗎? – xybrek

+0

不要擔心我會在工作時標記它 – xybrek

+0

現在我仍然有一個服務與'服務'方法的問題 – xybrek