Hello !

I have a project with a lot of dependencies and I want to embed them all 
in a jar so I use the following maven options :
<configuration>
  <instructions>
   <Export-Package>mypackage.*</Export-Package>
   <Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
   <Embed-Transitive>true</Embed-Transitive> 
  </instructions>
</configuration>
It seems to build well but when I try to deploy I get errors :
org.osgi.framework.BundleException: Unresolved constraint in bundle 123: 
package
; (package=com.sun.jdmk.comm)
and 
org.osgi.framework.BundleException: Unresolved constraint in bundle 125: 
package
; (package=com.sun.jimi.core)

When I look at the manifest I see those packages appear in the 
"Import-Package" section
Looking for those packages in my dependencies, I see that one is an 
optional dependency of log4j and the other of axis.
Because those dependencies are optionals, I should be able to remove them 
from the Import-Package...
Could somebody tell me how to do that ?

Thanks...

Valérie

Reply via email to