You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by techi_amol <te...@yahoo.com> on 2008/06/18 19:29:24 UTC
Help with Felix Maven Plugin
Hi All,
I trying to wrap one of our standalone JMS apps into an OSGI bundle. To do
that i need to include some dependencies jar files inside the bundle archive
and add them as part of Bundle-ClassPath.
I tried added
<Embed-Dependency>*;scope=compile;inline=false</Embed-Dependency> to my
pom.xml but the generated bundle jar does not contain the dependencies jars
included in the bundle archive. Also Bundle-ClassPath attribute is not added
to the MANIFEST.MF.
How do i achieve the above? If someone has a sample pom, that will be great
thanks
Amol
--
View this message in context: http://www.nabble.com/Help-with-Felix-Maven-Plugin-tp17987996p17987996.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Help with Felix Maven Plugin
Posted by techi_amol <te...@yahoo.com>.
Hi all,
Thanks for the help i got this work. But there is one more thing. Here are
the instructions that i give for Manifest generation in my pom.xml
<configuration>
<instructions>
<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
<Bundle-Name>MLBOsgiRemoteDeployment Plug-in</Bundle-Name>
<Bundle-SymbolicName>MLBOsgiRemoteDeployment</Bundle-SymbolicName>
<Bundle-Version>${pom.version}</Bundle-Version>
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
<Bundle-Activator>mlb.osgi.remote.deploy.activator.MLBOsgiRemoteDeploymentBundleActivator</Bundle-Activator>
<Private-Package>mlb.osgi.remote.deploy.*</Private-Package>
</instructions>
The resulting bundle jar has the right Bundle-ClassPath arrtibute, how ever
this generates a Import-Package attribute. I dont want the control the
import package attribute thats i generated. If i add
<Import-Package> tag in the pom with the imports that i want, i get an error
that "Unresolved references to [<package name>] by class(es) on the
Bundle-Classpath [<list of jar file in the bundle classpath>]
Is there a way to make sure that <Embed-Dependency> added only the
Bundle-ClassPath attribute and not to the import package, or to enforce that
the import packages are with resolution=optional.
cheers
amol.
Martin Thelian wrote:
>
> techi_amol schrieb:
>> I tried added
>> <Embed-Dependency>*;scope=compile;inline=false</Embed-Dependency> to my
>> pom.xml but the generated bundle jar does not contain the dependencies
>> jars
>> included in the bundle archive. Also Bundle-ClassPath attribute is not
>> added
>> to the MANIFEST.MF.
> I think it does not work because you have set the scope to compile only.
> Try to use "scope=compile|runtime".
>
> Regards,
> Martin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Help-with-Felix-Maven-Plugin-tp17987996p18018281.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Help with Felix Maven Plugin
Posted by Martin Thelian <Ma...@gmx.at>.
techi_amol schrieb:
> I tried added
> <Embed-Dependency>*;scope=compile;inline=false</Embed-Dependency> to my
> pom.xml but the generated bundle jar does not contain the dependencies jars
> included in the bundle archive. Also Bundle-ClassPath attribute is not added
> to the MANIFEST.MF.
I think it does not work because you have set the scope to compile only.
Try to use "scope=compile|runtime".
Regards,
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org