[JAVA-4836] AWS dependency should be set as optional in Import-Package Created: 08/Jan/23 Updated: 28/Oct/23 Resolved: 11/Jan/23 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Packaging |
| Affects Version/s: | 4.8.0 |
| Fix Version/s: | 4.8.2 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Tomáš Toka Mrázek | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
OSGi mafinest does not have optional configuration for package com.amazonaws.auth. In /driver-core/build.gradle, afterEvaluate should have line
|
| Comments |
| Comment by Githook User [ 11/Jan/23 ] | |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Add OSGi package imports for AWS SDK v1 and v2 (#1065)
| |
| Comment by Githook User [ 11/Jan/23 ] | |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Add OSGi package imports for AWS SDK v1 and v2 (#1065)
| |
| Comment by Tomáš Toka Mrázek [ 11/Jan/23 ] | |
|
Looks like it works as expected. | |
| Comment by Jeffrey Yemin [ 11/Jan/23 ] | |
|
A manual test would be fantastic. Thank you for the offer. | |
| Comment by Tomáš Toka Mrázek [ 11/Jan/23 ] | |
|
Explicitly specifying packages in Import-Package basically overrides any automatic resolution for that package, that's why there is no version. According to OSGi spec no version specified means every version.
There's been some discussion in BND here to rather use DynamicImport-Package instead of optional packages, but I'd say it's ok as it is, since majority of libraries use the same principle. Besides on the official BND FAQ 42.4 there is used the same exact solution as proposed in your PR. I may test it manually in our OSGi environment before merge, if you wish. It's currently hacked via exporting packages through system bundle.
| |
| Comment by Jeffrey Yemin [ 10/Jan/23 ] | |
|
I put a fix in code review here and posed a question in the description about the lack of a version range for either of the packages. Can you let me know if you think that will cause a problem? Thanks, | |
| Comment by Jeffrey Yemin [ 09/Jan/23 ] | |
|
Note that AWS jars do not include OSGi package import/export metadata in their own MANIFEST.MF files. | |
| Comment by Tomáš Toka Mrázek [ 09/Jan/23 ] | |
|
Oh and this package is also required.
|