如何将 Hibernate 5 安装到 Apache Karaf v4 [英] How to install Hibernate 5 into Apache Karaf v4

查看:21
本文介绍了如何将 Hibernate 5 安装到 Apache Karaf v4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I've installed Apache Karaf v4.03 and queried the list of available features for Hibernate, as listed below. Unfortunately, I am using 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 的说明.是否已发布执行此任务的说明,也许还有可下载的功能文件?

I am unable to find instructions for installing Hibernate v5 into Karaf v4. Are there published instructions for performing this task, and perhaps a downloadable features file?

推荐答案

最新的 hibernate-release 已经准备好 Karaf 了:

Latest hibernate-release comes Karaf ready already:

如果您从 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 的部署文件夹,然后执行:

If you download the hibernate-release-5.0.5.Final.zip from hibernate's page (http://sourceforge.net/projects/hibernate/files/hibernate-orm/5.0.5.Final/hibernate-release-5.0.5.Final.zip/download) and decompress the file, you will see an osgi folder. There you can find an already prepared feauture: hibernate-osgi-5.0.5.Final-karaf.xml. You can just copy it to Karaf's deploy folder and then execute:

feature:install hibernate-orm

安装应该没有问题.

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

Another way to install hibernate 5.0.5 feature is to add a repo to features with the command:

feature:repo-add command.

在这里你可以看到hibernate的特性列表和我已经安装的特性:

Here you can see the list of hibernate's features and the one I have installed:

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()>

这篇关于如何将 Hibernate 5 安装到 Apache Karaf v4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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