Eclipse 构建 - 从 jar 包装中排除,但包含在最终产品中
我正在为我的 RCP 项目之一使用 Derby 本地(嵌入式)数据库。该数据库位于 eclipse 中的项目文件夹结构内,并经过检查以包含在构建中。
我在 Eclipse 中的文件夹结构是:
projectname
I
I- src
I
I- database
I I
I I-project database here
I
I
I- icons
...
Eclipse 构建过程现在将数据库文件夹(包括子文件夹)包含到项目的 jar 文件中。
不幸的是,我无法说服 Derby 查看打包的 jar 文件并使用其中的数据库,因此我希望将我在开发软件时使用和填充的数据库排除在 jar 打包之外,但包含在以后的包中构建产品。
我的梦想是拥有这样的产品文件夹结构:
productname
I
I- configuration
I
I- database ...!
I
I- jre
I
I- p2
I
I- plugins
I
I- artifacts.xml
I- productname.exe
I- productname.ini
这可以通过 PDE 构建过程来实现吗? 谢谢!
I am using a Derby local (embedded) database for one of my RCP projects. The database is located within the project folder structure in eclipse and is checked to be included in the build.
My folder structure in Eclipse is:
projectname
I
I- src
I
I- database
I I
I I-project database here
I
I
I- icons
...
The Eclipse build process now includes the database folder including the subfolders into the jar file of the project.
Unfortunately I can not convice Derby to look inside the packaged jar file and use the database there, so I would like to have the database, which I am using and filling while developing the software, excluded from the jar packaging, but included into the later build product.
My dream would be to have the product folder structure like this:
productname
I
I- configuration
I
I- database ...!
I
I- jre
I
I- p2
I
I- plugins
I
I- artifacts.xml
I- productname.exe
I- productname.ini
Can this somehow be achieved with the PDE build process?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我没有完整的答案,但我可以提供一些建议。
首先,您可以创建一个新插件来仅包含您的数据库。然后,您可以将此插件导出为分解的(基于文件夹的)插件,而不是导出为 jar。这将允许 Derby 访问数据库文件,并且您可以在构建产品时有选择地包含该插件。
另一个可能值得研究的选项是非插件数据功能功能。似乎这些功能提供了一种机制,您可以将非插件数据与插件分开管理,并且这支持更新站点。我自己没有使用过该工具,但这里有一个可能令人感兴趣的线程: http://dev.eclipse.org/mhonarc/lists/platform-update-dev/msg00807.html
I don't have a complete answer, but I can offer some suggestions.
Firstly, you could create a new plug-in to contain just your database. You could then export this plug-in as an exploded (folder-based) plug-in, rather than as a jar. This would allow Derby to access the database files and you could selectively include the plug-in when you're building your product.
Another option that might be worth investigating is the non-plug-in data facility of features. It seems that features offer a mechanism where you can manage non-plug-in data separately to plug-ins, and that this supports update sites. I've not used the facility myself, but there's a thread that might be of interest here: http://dev.eclipse.org/mhonarc/lists/platform-update-dev/msg00807.html