I have OSGi bundle for sending mails, so it’s using com.sun.smtp package from mail-1.4.jar. But OSGi service do not have access to this jar.
Can you help me, how to configure Maven POM file so mail-1.4.jar will be included in my bundle jar so OSGi service could use it?
EDIT
Error is:
javax.mail.NoSuchProviderException: Unable to locate provider for protocol: smtp
I would advise to not include the mail jar in your bundle. The better way is to simply install the mail.jar in the osgi runtime.
You have to make sure you have two things in place to make this work:
mvn install -s mvn:javax.mail/mail/1.4.4 if not then the jar below should help. It contains a correct Manifest file for OSGi deployment http://search.maven.org/#artifactdetails|javax.mail|mail|1.4.4|jar