[CONJ-925] v3.0.3 is not OSGi compliant Created: 2022-02-06  Updated: 2022-04-11  Resolved: 2022-03-18

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: 3.0.3
Fix Version/s: 3.0.4

Type: Bug Priority: Major
Reporter: Rakesh Kumar Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None

Attachments: PNG File screenshot-1.png    

 Description   

I was trying to use the latest driver version 3.0.3 in an OSGi environment but found that it is no more an OSGi bundle (missing OSGi metadata).



 Comments   
Comment by Rakesh Kumar [ 2022-02-06 ]

provided a fix in this PR - https://github.com/mariadb-corporation/mariadb-connector-j/pull/177

Please review.

Comment by Diego Dupin [ 2022-03-04 ]

commited in 3.0.4-SNAPSHOT, avoiding to have another dependency for no reason.
could you confirm correction ?
(available using :

<repositories>
    <repository>
        <id>sonatype-nexus-snapshots</id>
        <name>Sonatype Nexus Snapshots</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
</repositories>
 
<dependencies>
    <dependency>
        <groupId>org.mariadb.jdbc</groupId>
        <artifactId>mariadb-java-client</artifactId>
        <version>3.0.4-SNAPSHOT</version>
    </dependency>
</dependencies>

)

Comment by Rakesh Kumar [ 2022-03-18 ]

Hi Diego,

Sorry, I could not test it earlier.

I just tried to use 3.0.4-SNAPSHOT but it is still not an OSGi bundle.

Here is the screenshot of MANIFEST.MF file from decompiled jar

Regarding using the bnd-maven-plugin, its just a maven build plugin and not needed at runtime so no extra baggage at runtime, its a special tool to generate OSGi metadata correctly and most accurately.

I think it is better to use the bnd-maven-plugin rather than writing the OSGi metadata by hand, rest is your decision.

Thanks,
Rakesh

Comment by Diego Dupin [ 2022-03-22 ]

The 3.0.4-SNAPSHOT wasn't updated to latest version, the OSGI correction wasn't there.
Finally after testing the result in MANIFEST.MF of the plugin, i agree that it is better.
PR is merged.

Comment by Brent Levinson [ 2022-04-11 ]

Fixed! Thank you!

Generated at Thu Feb 08 03:19:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.