与AppEngine一起使用工作区项目 [英] Using workspace projects with AppEngine

查看:113
本文介绍了与AppEngine一起使用工作区项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的Google AppEngine项目中使用库项目作为构建路径上的项目。



有没有办法让AppEngine包含项目,而不必复制整个源代码或制作一个jar包?



我只使用库的一小部分,所以看起来像是矫枉过正的复制整个jar和很多在源代码中查找依赖关系,只获取我正在使用的部分。 你不会喜欢这个答案,但没有。



为了将库作为项目中的依赖项包含在项目中,必须在 WEB中找到所需的库-INF / lib 目录作为jar。这将要求你根据你要使用的库创建一个jar文件。另一个选择就是按照你所说的将相关源代码放到你的项目中并从那里使用它。



在开发过程中,你可以使库项目成为你的依赖项通过执行以下操作来完成应用程序引擎项目:

 在Project-> Properties-> Java Build Path-> Projects Tab中
选择添加..按钮将一个子项目添加到您的版本。

注意:这不会解决生产环境中的运行问题。


I'm trying to use a library project with my Google AppEngine project as a project on build path.

Is there a way to get that included in the AppEngine project without having to copy the entire source or make a jar ?

I only use a small portion of the library so it seems like overkill to copy the whole jar and a lot of work to find the dependencies within the source to get only the parts I'm using.

解决方案

You are not going to like this answer, but No.

In order to include the library as a dependency in the project once deployed the required library must be found in your WEB-INF/lib directory as a jar. This is going to require you to you to create a jar based on the library you want to use. The other option is to do just as you said pull the dependent source into your project and use it from there.

During development you can make the library project a dependency of your app engine project by doing the following:

Under Project->Properties->Java Build Path->Projects Tab
select the "Add.." button to add a subproject to your build.

Note: This will not address the the running in a production environment.

这篇关于与AppEngine一起使用工作区项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆