繁体   English   中英

使用Maven将jar加载到项目中

[英]Load jar into project with maven

我的应用程序需要提供这样的servlet:

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

但是,此DatastoreViewerServlet位于我的计算机中的运行时sdk中:

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

因此,当我运行应用程序时,如何加载该jar。 我正在使用maven,当我运行我的应用程序时,我只是执行mvn gwt:run

您可以在依赖项标记中使用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>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM