Datanucleus JDO - 我需要什么罐子?
背景:
我正在学习 Java,并正在构建一个 Web 应用程序作为研究(边做边学)。我决定使用 JDO(datanucleus) 和 H2 来实现持久性。我是 Java 语言的新手,所以请随意认为我可悲地无知 =)
问题:
我的类路径中需要包含哪些 Jars?我目前有:
- api-jdo-3.0.0
- core-3.0.0
- rdbms-3.0.0
- jdo-api-3.1 (javax.jdo package)
- log4j-1.2.14
我已阅读 Datanucleus.org 我已经下载了“accessplatform-rdbms-3.0.0-release”来自sourceforge。我还安装了 Eclipse(indigo) 的 datanucleus 插件。
要选择上面的那些:我打开了 jar 并查找了文档中引用的类,并且我还找到了该站点 MavenHub (顺便说一句,我没有使用 maven),看起来那里有一个依赖项列表。然而,访问平台包含它自己的“api-jdo-3.0.0”jar(除了 deps\ 文件夹中的 Apache jar)和一个“rdbms-3.0.0”jar。 MavenHub 依赖项列表中没有提到这些。
我知道有些罐子提供了我不需要的附加功能,但我似乎找不到“基本”实现列表。 lib/ 文件夹中有 14 个 jar(例如“jdo-query-3.0.0”看起来非常重要)。任何人都可以在这方面给我建议,或者更好的是,启发我(链接一个手持教程或我可以使用的 MavenHub 等资源)?
(我对 MavenHub 列表有点怀疑,因为它似乎过于简短。)
感谢您帮助我
编辑:
移动了答案,因此问题显示为已回答。
Context:
I am learning Java, and am building a web application as a study(learn by doing). I've decided to use JDO(datanucleus) and H2 for persistence. I am a novice with the Java language, so feel free to consider me pathetically ignorant =)
Question:
Which of the included Jars are required in my classpath? I currently have:
- api-jdo-3.0.0
- core-3.0.0
- rdbms-3.0.0
- jdo-api-3.1 (javax.jdo package)
- log4j-1.2.14
I have read through the documentation at Datanucleus.org and I have downloaded the "accessplatform-rdbms-3.0.0-release" from sourceforge. I have also installed the datanucleus plugin for Eclipse(indigo).
To select the ones I have above: I opened up the jars and hunted down the classes referenced in the documentation, and I also found the site MavenHub (I'm not using maven btw) and it looks like there is a dependency listing there. However the access platform contains its own "api-jdo-3.0.0" jar (in addition to the Apache one in the deps\ folder) and a "rdbms-3.0.0" jar. Neither of these are mentioned in the MavenHub dependency list.
I understand that some of the jars provide additional features that I wont need, but I cant seem to find a "basic" implementation list. There are 14 jars in the lib/ folder ("jdo-query-3.0.0" looks pretty important for example). Can anyone advise me on this, or better yet, enlighten me (link a hand holding tutorial or a resource like MavenHub i can use)?
(I was kinda dubious about the MavenHub list because it seemed overly brief.)
Thanks for helping me out
EDIT:
Moved Answer so question appears as answered.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在网站和教程下载中都找到了它。
对于任何其他人:
正如 DataNucleus 指出的那样;在网站上,它位于“增强课程”部分下指南的。
另一个位置是在 Datanucleus Sourceforge 上,有示例:
“datanucleus-samples-jdo- “tutorial-3.0-src.zip”中有几个自述文件,在这些文件中,它列出了必要的文件:
网站上的列表很容易被错过(尽管我看了几次)。此外,您必须从 Apache jdo-api.jar 导入(非此即彼):
才能在类中使用注释,并根据您在类中执行的操作来引用持久性管理器。
I found it, both on the website and in the tutorial downloads.
For any others:
As DataNucleus pointed out; on the website it is under the "enhance your classes" section of the guide.
The other location is on the Datanucleus Sourceforge, there are samples:
"datanucleus-samples-jdo-tutorial-3.0-src.zip" has several Readme files in it and in those files, it lists the necessary files:
The listing on the site is easy to miss, (I did despite looking several times). Additonally, you have to import (either-or):
from the Apache jdo-api.jar to use annotations in your classes, and to reference the Persistence Managers depending on what your doing in the class.