在Windows 10上将RedHat Fuse 7.5用于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
引发与上述相同的异常。
有人可以在这里遮掩一下吗?
非常感谢。
亲切的问候,
尼古拉斯
答案 0 :(得分:1)
此问题是由Karaf不使用本地maven安装及其设置而是其自己的安装引起的。因此,在我使用HTTP代理的情况下,需要配置Karaf以使用HTTP代理,或者告诉它使用本地maven设置。这发生在$ KARAF_HOME / etc / org.ops4j.pax.url.mvn.cfg文件中。