On 8/4/09 4:33, [email protected] wrote:
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 ?
I believe you should be able to simply do:
<Import-Package>!com.sun.*,*</Import-Package>
The "!" tells BND to not import those packages, while the trailing *
tells it to import everything else.
-> richard
Thanks...
Valérie
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]