felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Smoot <mike.sm...@gmail.com>
Subject Re: Felix Maven2 "bundle" plugin : problem with version ranges
Date Tue, 24 May 2011 18:54:07 GMT
There's a comma you're missing.  The version range is from 3.1 up to, but
not including version 4.  This is based on the export version supplied by
the library in question (which is presumably one of the 3.1 snapshots
because you specified a range in the dependency) and the semantic versioning
standard that Bnd uses.  You can read about why the version is 3.1 here:
http://www.aqute.biz/Bnd/Versioning.  If you want the import package range
to be [3.0,4), then I think you just need to specify your jdo version as 3.0
in your dependencyk rather than as a range.  It gets confusing detangling
the maven versions and how they are used from the OSGi versions and how they
are used.

Dunno about the Require-Bundle question.


Mike

On Tue, May 24, 2011 at 8:13 AM, Andy Jefferson <lists@datanucleus.org>wrote:

> Hi,
>
> I tried experimenting with the bundle plugin to generate a MANIFEST.MF
> (rather
> than using manually generated ones that we currently use). I'm getting
> problems with the ImportPackage declarations of version ranges.
>
> The project is minimal, and pom.xml includes
>
>    <packaging>bundle</packaging>
>    <repositories>
>        <repository>
>            <id>DataNucleus_M2</id>
>            <name>DataNucleus Maven2 Repository</name>
>            <url>http://www.datanucleus.org/downloads/maven2</url>
>        </repository>
>        <repository>
>             <id>DataNucleus_M2-nightly</id>
>             <name>DataNucleus Maven2 Nightly Repository</name>
>             <url>http://www.datanucleus.org/downloads/maven2-nightly</url>
>        </repository>
>    </repositories>
>
>    <dependencies>
>        <dependency>
>            <groupId>org.datanucleus</groupId>
>            <artifactId>datanucleus-core</artifactId>
>            <version>[2.9, )</version>
>        </dependency>
>        <dependency>
>            <groupId>org.datanucleus</groupId>
>            <artifactId>datanucleus-api-jdo</artifactId>
>            <version>[2.9, )</version>
>        </dependency>
>        <dependency>
>            <groupId>org.datanucleus</groupId>
>            <artifactId>datanucleus-rdbms</artifactId>
>            <version>[2.9, )</version>
>        </dependency>
>        <dependency>
>            <groupId>javax.jdo</groupId>
>            <artifactId>jdo-api</artifactId>
>            <version>[3.0, )</version>
>            <scope>provided</scope>
>        </dependency>
>    </dependencies>
>            <plugin>
>                <groupId>org.apache.felix</groupId>
>                <artifactId>maven-bundle-plugin</artifactId>
>                <version>2.3.4</version>
>                <extensions>true</extensions>
>                <configuration>
>                    <instructions>
>
>  <Bundle-SymbolicName>${project.artifactId};singleton:=true</Bundle-SymbolicName>
>
>  <Export-Package>org.datanucleus.test.*</Export-Package>
>                        <Import-Package>*</Import-Package>
>                    </instructions>
>                </configuration>
>            </plugin>
>
>
> and the generated MANIFEST.MF has
> Import-Package: javax.jdo;version="[3.1,4)",javax.jdo.annotations;vers
>  ion="[3.1,4)",org.datanucleus.util
>
> javax.jdo has versions 3.0, 3.1-SNAPSHOT-20110223, 3-1-SNAPSHOT-20110319 in
> the specified repositories, and I selected inclusive versions from 3.0. So
> how
> does it get 3.1.4+?????!
>
>
> Also, how would I get it to generate a Require-Bundle for the
> org.datanucleus
> dependencies in my dependencies section?
>
>
> TIA
> --
> Andy
> DataNucleus (http://www.datanucleus.org)
>



-- 
____________________________________________________________
Michael Smoot, Ph.D.
UCSD Department of Medicine
tel: 858-822-4756

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message