Thanks Felix for your advice.
On Fri, Sep 7, 2012 at 2:56 PM, Felix Meschberger <fmesc...@adobe.com>wrote: > Hi, > > Am 07.09.2012 um 10:15 schrieb Dileepa Jayakody: > > > Hi All, > > > > In our projects we use maven bundle plugin: 2.3.5 to bundle our > components. > > And recently I have come across this intermittent case of having random > > version-ranges added for import-packages in the bundle Manifest for some > > packages without defined explicitly in the pom. > > > > Eg: In some of our poms; An imports for org.wso2.carbon.* is given as > below > > under maven-bundle plugin without explicitly having a import package > > version. > > > > <Import-Package> > > ... > > *org.wso2.carbon.core.**, > > org.wso2.carbon.user.core, > > org.wso2.carbon.utils, > > org.wso2.carbon.registry.core > > ... > > <Import-Package> > > > > But in the Manifest I see below entries as Import-Package: > > > > > org.wso2.carbon.core;version="[4.0,5)",org.wso2.carbon.core.multitenancy;version=" > > [4.0,5)",org.wso2.carbon.core.persistence;version="[4.0,5)", > > > org.wso2.carbon.core.persistence.file;version="[4.0,5)",org.wso2.carbon.core.util; > > version="[4.0,5)" > > > > The bundle-plugin has silently added *version="[4.0,5)"* for above > imports. > > But the bundle exporting org.wso2.carbon.core.* packages doesn't specify > a > > version. > > Can anybody please explain how* *these version ranges get added to the > > Manifest? Does the plugin search dependencies from the maven dependecy > > tree? > > This means the plugin has a dependency in the class path which exposes an > export of version 4.0 of these packages. The plugin (and BND) will not just > invent these versions. > > > > How can we avoid these version ranges being added automatically? > > Not a good idea. Better have the provider bundle deplyoed export the > correct version numbers. See also the OSGi white paper on semantic > versioning. > > Regards > Felix > > [1] http://www.osgi.org/wiki/uploads/Links/SemanticVersioning.pdf > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@felix.apache.org > For additional commands, e-mail: users-h...@felix.apache.org > > -- Dileepa Jayakody, Software Engineer, WSO2 Inc. Lean . Enterprise . Middleware Mobile : +94777-857616