一尘不染

如何将Hibernate 5安装到Apache Karaf v4中

hibernate

我已经安装了Apache Karaf v4.03,并查询了Hibernate可用功能的列表,如下所示。不幸的是,我正在使用Hibernate v5。

hibernate                     | 3.3.2.GA         |          | Uninstalled | enterprise-4.0.3         | Hibernate 3.x JPA persistence engine support
hibernate                     | 4.2.15.Final     |          | Uninstalled | enterprise-4.0.3         | Hibernate 4.2.x JPA persistence engine support
hibernate-envers              | 4.2.15.Final     |          | Uninstalled | enterprise-4.0.3         | Hibernate Envers 4.2.x
hibernate                     | 4.3.6.Final      |          | Uninstalled | enterprise-4.0.3         | Hibernate 4.3.x JPA persistence engine support
hibernate-envers              | 4.3.6.Final      |          | Uninstalled | enterprise-4.0.3         | Hibernate Envers 4.3.x
hibernate-validator           | 5.0.3.Final      |          | Uninstalled | enterprise-4.0.3         | Hibernate Validator support

我找不到将Hibernate v5安装到Karaf v4中的说明。是否有执行该任务的已发布说明,或者是否有可下载的功能文件?


阅读 217

收藏
2020-06-20

共1个答案

一尘不染

最新的hibernate版本已使Karaf做好准备:

如果您从hibernate的页面下载了hibernate-
release-5.0.5.Final.zip(http://sourceforge.net/projects/hibernate/files/hibernate-
orm/5.0.5.Final/hibernate-release-5.0.5 .Final.zip /
download)并解压缩文件,您将看到一个osgi文件夹。在这里您可以找到已经准备好的功能:hibernate-
osgi-5.0.5.Final-karaf.xml。您可以将其复制到Karaf的deploy文件夹中,然后执行:

feature:install hibernate-orm

它应该安装没有任何问题。

安装hibernate 5.0.5功能的另一种方法是使用以下命令向功能添加存储库:

feature:repo-add command.

在这里,您可以看到hibernate功能的列表以及我已安装的功能:

karaf@root()> feature:list | grep hibernate
hibernate                     | 3.3.2.GA         |          | Uninstalled | enterprise-4.0.3         | Hibernate 3.x JPA persistence engine support
hibernate                     | 4.2.15.Final     |          | Uninstalled | enterprise-4.0.3         | Hibernate 4.2.x JPA persistence engine support
hibernate-envers              | 4.2.15.Final     |          | Uninstalled | enterprise-4.0.3         | Hibernate Envers 4.2.x
hibernate                     | 4.3.6.Final      |          | Uninstalled | enterprise-4.0.3         | Hibernate 4.3.x JPA persistence engine support
hibernate-envers              | 4.3.6.Final      |          | Uninstalled | enterprise-4.0.3         | Hibernate Envers 4.3.x
hibernate-validator           | 5.0.3.Final      |          | Uninstalled | enterprise-4.0.3         | Hibernate Validator support
hibernate-orm                 | 5.0.5.Final      | x        | Started     | hibernate-osgi           | Combines all Hibernate core dependencies and requ
hibernate-envers              | 5.0.5.Final      |          | Uninstalled | hibernate-osgi           | Feature for easily adding Envers support to hiber
hibernate-infinispan          | 5.0.5.Final      |          | Uninstalled | hibernate-osgi           | Feature for easily adding Infinispan-based cachin
hibernate-ehcache             | 5.0.5.Final      |          | Uninstalled | hibernate-osgi           | Feature for easily adding Ehcache-based caching s
karaf@root()>
2020-06-20