It seems the only way to make theh application deploy was to:
1) Uninstall the container-provided spring-dm feature;
2) Include the spring-osgi-extender as a compile-scoped dependency (not
PROVIDED by the container), e.g.
<dependency>
<groupId>org.springframework.osgi</groupId>
<artifactId>spring-osgi-extender</artifactId>
<version>${spring-osgi.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.aop</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.beans</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.context</artifactId>
</exclusion>
</exclusions>
</dependency>
This just doesn't seem right to me. Isn't there a better way? If Karaf
provides both spring-dm (v1.2.1 - the same version as the one I am using in
my Maven configuration for spring-osgi-extender) and Spring 4, why would the
container not recognize things appropriately? It just seems too clumsy and
ugly. I shouldn't be packaging spring-osgi-extender in each bundle.
Could someone please explain: is the the Karaf flaw, or am I not doing
something correctly? And if it's he latter, where is it documented? Can
anything be easy and intuitive with OSGi? ;-)
--
View this message in context:
http://karaf.922171.n3.nabble.com/Spring-4-0-2-and-spring-dm-tp4033093p4033095.html
Sent from the Karaf - User mailing list archive at Nabble.com.