There's a problem with the OSGi manifest entries that has cropped up in 3.1.2 that I did not see in 3.1.1. I have created a libd file for 3.1.2, the same exact one I created for 3.1.1 except for the version. With 3.1.1 the jars all load fine. With 3.1.2 I get an exception (using Virgo 3.5.0.RELEASE):
Code:
Caused by: org.eclipse.virgo.kernel.osgi.framework.ImportMergeException:
cannot merge imports of package 'org.springframework.context.annotation' from sources
'Import-Library 'org.springframework.spring' version '3.1.2.RELEASE'(Import-Bundle 'org.springframework.context' version '3.1.2.RELEASE', Import-Bundle 'org.springframework.aspects' version '3.1.2.RELEASE')'
because of conflicting values 'org.springframework.aspects', 'org.springframework.context' of attribute 'bundle-symbolic-name'
The libd is
Code:
Library-SymbolicName: org.springframework.spring
Library-Version: 3.1.2.RELEASE
Library-Name: Spring Framework
Import-Bundle:
org.springframework.aop;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
org.springframework.asm;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
org.springframework.aspects;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
org.springframework.beans;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
org.springframework.context;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
org.springframework.context.support;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
org.springframework.core;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
org.springframework.expression;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
org.springframework.jdbc;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
org.springframework.jms;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
org.springframework.orm;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
org.springframework.oxm;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
org.springframework.transaction;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
org.springframework.web;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
org.springframework.web.servlet;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
org.springframework.web.portlet;version="[3.1.2.RELEASE, 3.1.2.RELEASE]",
com.springsource.org.aopalliance;version="[1.0.0, 1.0.0]"
This is as I said exactly the same as the one I use for 3.1.1. Both are adapted from the libd for 3.0.5 that ships with Virgo 3.5.0.RELEASE. Nothing but version numbers have changed from 3.0.5 -> 3.1.1 -> 3.1.2.
An example manifest for a bundle that imports the libd is (for use with bundlor)
Code:
Bundle-ManifestVersion: 2
Bundle-Name: ${project.name}
Bundle-SymbolicName: ${project.groupId}.common
Bundle-Version: 1.0.0.SNAPSHOT
Import-Library: org.springframework.spring;version="[3.1.2,3.2.0)"