Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.8.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      OSGi / Java
    • Operating System:
      ALL
    • # Replies:
      37
    • Last comment by Customer:
      false

      Description

      The OSGi bundle MANIFEST.MF file looks incorrect:

      Bundle-Name: MongoDB
      Bundle-SymbolicName: com.mongodb
      Bundle-Version: 2.1.0
      Export-Package: com.mongodb, com.mongodb.io, com.mongodb.util, com.mon
      godb.gridfs, org.bson, org.bson.util, org.bson.types, org.bson.io

      Shouldn't that be 2.4.0?

      Please also note that (odd enough) the bundle version number is not used as a default version for exported packages that do not explicitely specify an export version. As a consequence one can not import these packages with a well-defined version range. Both issues require me to repackage this bundle, which also creates a potential for deployment duplication.

      Say, do you plan to provide an Equinox p2 repository for your OSGi bundles?

        Activity

        Hide
        bryan.reinero@10gen.com Bryan Reinero added a comment -

        Tested loaded the driver as a bundle in a stand-alone instance of Equinox. The bundle generates no errors on install.

        Show
        bryan.reinero@10gen.com Bryan Reinero added a comment - Tested loaded the driver as a bundle in a stand-alone instance of Equinox. The bundle generates no errors on install.
        Hide
        jeff.yemin Jeff Yemin added a comment -

        I've done a bunch of testing of version ranges with maven, and though they are not widely used, I'm not comfortable changing the naming conventions of the jars that we publish to the maven central repository. Instead, I'm going to follow the convention used by the maven bundle plugin, and convert (manually for now, using build.properties) OSGi-incompatible maven versions into OSGi-compatible ones. So it will look like this:

        Maven version OSGi version
        2.8.0-RC1 2.8.0.RC1
        2.8.0 2.8.0.RELEASE

        I've also changed some of the values in the manifests, including

        • Added Bundle-License
        • Changed Bundle-Name to MongoDB Java Driver
        • Changed Bundle-SymbolicName to org.mongodb.mongo-java-driver
        • Removed Bundle-ClassPath

        So the full manifest is going to look like:

        Manifest-Version: 1.0
        Ant-Version: Apache Ant 1.8.2
        Created-By: 1.6.0_31-b04-415-11M3635 (Apple Inc.)
        Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
        Bundle-ManifestVersion: 2
        Bundle-Name: MongoDB Java Driver
        Bundle-SymbolicName: org.mongodb.mongo-java-driver
        Bundle-Version: 2.8.0.RELEASE
        Import-Package: javax.management, javax.net, javax.net.ssl
        Export-Package: com.mongodb;version="2.8.0.RELEASE",com.mongodb.io;ver
         sion="2.8.0.RELEASE",com.mongodb.util;version="2.8.0.RELEASE",com.mon
         godb.gridfs;version="2.8.0.RELEASE",org.bson;version="2.8.0.RELEASE",
         org.bson.util;version="2.8.0.RELEASE",org.bson.util.annotations;versi
         on="2.8.0.RELEASE",org.bson.types;version="2.8.0.RELEASE",org.bson.io
         ;version="2.8.0.RELEASE"

        while the maven POM will have a version of 2.8.0 and the name of the jar file will be mongo-java-driver-2.8.0.jar.

        Please let me know if you see any problems with this.

        Show
        jeff.yemin Jeff Yemin added a comment - I've done a bunch of testing of version ranges with maven, and though they are not widely used, I'm not comfortable changing the naming conventions of the jars that we publish to the maven central repository. Instead, I'm going to follow the convention used by the maven bundle plugin, and convert (manually for now, using build.properties) OSGi-incompatible maven versions into OSGi-compatible ones. So it will look like this: Maven version OSGi version 2.8.0-RC1 2.8.0.RC1 2.8.0 2.8.0.RELEASE I've also changed some of the values in the manifests, including Added Bundle-License Changed Bundle-Name to MongoDB Java Driver Changed Bundle-SymbolicName to org.mongodb.mongo-java-driver Removed Bundle-ClassPath So the full manifest is going to look like: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.8.2 Created-By: 1.6.0_31-b04-415-11M3635 (Apple Inc.) Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt Bundle-ManifestVersion: 2 Bundle-Name: MongoDB Java Driver Bundle-SymbolicName: org.mongodb.mongo-java-driver Bundle-Version: 2.8.0.RELEASE Import-Package: javax.management, javax.net, javax.net.ssl Export-Package: com.mongodb;version="2.8.0.RELEASE",com.mongodb.io;ver sion="2.8.0.RELEASE",com.mongodb.util;version="2.8.0.RELEASE",com.mon godb.gridfs;version="2.8.0.RELEASE",org.bson;version="2.8.0.RELEASE", org.bson.util;version="2.8.0.RELEASE",org.bson.util.annotations;versi on="2.8.0.RELEASE",org.bson.types;version="2.8.0.RELEASE",org.bson.io ;version="2.8.0.RELEASE" while the maven POM will have a version of 2.8.0 and the name of the jar file will be mongo-java-driver-2.8.0.jar. Please let me know if you see any problems with this.
        Hide
        auto auto (Inactive) added a comment -

        Author:

        {u'login': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

        Message: JAVA-272: To deal with the OSGi/Maven version name incompatibilities, added ability to use a different version name for maven and OSGi. So the Maven POM that we upload would have a version like 2.8.0-RC1 or 2.8.0, while the corresponding Bundle-Version in MANIFEST.MF would be 2.8.0.RC1 or 2.8.0.RELEASE. Hopefully this will work for both Maven and OSGi users, as it's the strategy used by, for example the maven-bundle-plugin
        Branch: master
        https://github.com/mongodb/mongo-java-driver/commit/91e4135b2faf666092acf036838b9caa087137ec

        Show
        auto auto (Inactive) added a comment - Author: {u'login': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'} Message: JAVA-272 : To deal with the OSGi/Maven version name incompatibilities, added ability to use a different version name for maven and OSGi. So the Maven POM that we upload would have a version like 2.8.0-RC1 or 2.8.0, while the corresponding Bundle-Version in MANIFEST.MF would be 2.8.0.RC1 or 2.8.0.RELEASE. Hopefully this will work for both Maven and OSGi users, as it's the strategy used by, for example the maven-bundle-plugin Branch: master https://github.com/mongodb/mongo-java-driver/commit/91e4135b2faf666092acf036838b9caa087137ec
        Hide
        auto auto (Inactive) added a comment -

        Author:

        {u'login': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

        Message: JAVA-272: Cleaning of the manifest. Added Bundle-License, improved Bundle-Name and Bundle-SymbolicName, removed Bundle-ClassPath
        Branch: master
        https://github.com/mongodb/mongo-java-driver/commit/e89633f9266a50c2d899adf086deefa08aeae1c2

        Show
        auto auto (Inactive) added a comment - Author: {u'login': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'} Message: JAVA-272 : Cleaning of the manifest. Added Bundle-License, improved Bundle-Name and Bundle-SymbolicName, removed Bundle-ClassPath Branch: master https://github.com/mongodb/mongo-java-driver/commit/e89633f9266a50c2d899adf086deefa08aeae1c2
        Hide
        jeff.yemin Jeff Yemin added a comment -

        Closing for 2.8.0 release.

        Show
        jeff.yemin Jeff Yemin added a comment - Closing for 2.8.0 release.

          People

          • Votes:
            9 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              3 years, 2 weeks, 3 days ago
              Date of 1st Reply: