【问题标题】:RedHat Fuse 7.5 - Can't deploy featureRedHat Fuse 7.5 - 无法部署功能
【发布时间】:2020-04-06 03:20:10
【问题描述】:

在 Windows 10 上使用 RedHat Fuse 7.5 for Apache Karaf 平台。我正在定义如下所示的功能:

  ...
  <feature name="customers-data" version="${project.version}">
    <feature>transaction</feature>
    <feature>jndi</feature>
    <feature>pax-jdbc-config</feature>
    <feature>pax-jdbc-oracle</feature>
    <feature>pax-jdbc-pool-dbcp2</feature>
    <feature>jdbc</feature>
    <feature dependency="true">aries-blueprint</feature>
    <feature>jpa</feature>
    <feature>hibernate</feature>
    <bundle>...</bundle>
  </feature>
  ...

添加新的存储库按预期工作,但尝试安装该功能:

karaf@root()> feature:install customers-data

引发以下异常:

2019-12-12 17:43:02,385 | WARN  | ownloader-5-thread-7 | o.o.p.u.m.i.AetherBasedResolver  | 5 - org.ops4j.pax.url.mvn - 2.6.1 | Error resolving artifact 
org.apache.aries.jpa.javax.persistence:javax.persistence_2.1:jar:2.7.2: [Could not transfer artifact org.apache.aries.jpa.javax.persistence:javax.persistence_2.1:jar:2.7.2 from/to maven.central.repo 
(https://repo1.maven.org/maven2/): Connect to repo1.maven.org:443 [repo1.maven.org/151.101.36.209] failed: connect timed out, Could not transfer artifact 
org.apache.aries.jpa.javax.persistence:javax.persistence_2.1:jar:2.7.2 from/to redhat.ga.repo 
(https://maven.repository.redhat.com/ga/): Connect to maven.repository.redhat.com:443 
[maven.repository.redhat.com/23.60.31.183] failed: connect timed out 

查找我得到的功能:

karaf@root()> feature:list | grep aries-jpa
jpa                                      | 2.7.2                           |          | Uninstalled | aries-jpa-2.7.2                               | OSGi Persistence Container
karaf@root()>

所以功能 aries-jpa-2.7.2 已注册。正在尝试安装它:

karaf@root()> feature:install jpa

引发与上述相同的异常。

有人可以在这里遮光吗?

非常感谢。

亲切的问候,

尼古拉斯

【问题讨论】:

标签: osgi apache-karaf jbossfuse


【解决方案1】:

问题是由于 Karaf 不使用本地 maven 安装及其设置,而是使用它自己的设置。因此,当在 HTTP 代理后面时,就像我的情况一样,需要将 Karaf 配置为使用 HTTP 代理或告诉它使用本地 maven 设置。这发生在 $KARAF_HOME/etc/org.ops4j.pax.url.mvn.cfg 文件中。

【讨论】:

    猜你喜欢
    • 2018-12-29
    • 2017-11-15
    • 1970-01-01
    • 1970-01-01
    • 2020-10-15
    • 2021-11-17
    • 2021-01-30
    相关资源
    最近更新 更多