简体   繁体   中英

Hibernate Karaf features for versions under 5.0.0

I'm trying to install hibernate into karaf using the features mechanism.

The solution given here by Mr Christian Schneider works fine for hibernate versions over 5.0.0 , but it doesn't for versions under:

karaf@root>feature:repo-add hibernate 4.3.11
Adding feature url mvn:org.hibernate/hibernate-osgi/4.3.11/xml/karaf
Error executing command: Error resolving artifact org.hibernate:hibernate-osgi:xml:karaf:4.3.11: Could not find artifact org.hibernate:hibernate-osgi:xml:karaf:4.3.11 in central (http://repo1.maven.org/maven2/) : mvn:org.hibernate/hibernate-osgi/4.3.12/xml/karaf

I suspect because features for those versions aren't available.

So my question: How to know which versions are available ?

How to install features for versions under 5.0.0 ?

To know which versions are availiable you can use the feature:versions-list command, it will show you the availiable versions of that feature and which features repository owns it.

And for the versions older than 5.0.0, you have some choices:

You can create your own hibernate feature, search for older versions of the feature you want to install, or you can also edit the existing feature.xml adding the version you want and refreshing the repository with feature:repo-refresh .

For the last one you can find the hibernate-osgi feature at %KARAF_HOME%/system/org/hibernate/hibernate-osgi .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM