You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Eshan Sudharaka <es...@gmail.com> on 2011/06/23 12:46:10 UTC
Unresolved references : how to fix
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>1.4.0</version>
<extensions>true</extensions>
<configuration>
<manifestLocation>META-INF</manifestLocation>
<instructions>
<Include-Resource>target/classes</Include-Resource>
<Bundle-SymbolicName>${bundle.symbolicName};singleton:=true
</Bundle-SymbolicName>
<Bundle-Version>${pom.version}</Bundle-Version>
<Require-Bundle>org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.ui,
org.eclipse.jface
</Require-Bundle>
<Import-Package>!</Import-Package>
<Private-Package>!</Private-Package>
<Bundle-Activator>${bundle.namespace}.Activator
</Bundle-Activator>
<Embed-Dependency>
*;scope=compile|runtime|provided;inline=false;
</Embed-Dependency>
<Embed-Directory>target/dependency
</Embed-Directory>
<Embed-StripGroup>true</Embed-StripGroup>
</instructions>
</configuration>
</plugin>
<plugin>
This is my felix pluging and when i try to build bundle it gives following
error.
* Unresolved references to [com.caucho.hessian.client,*
In my pom file i do not have above dependencies. But it may has indirect
reference. How do i solve this ?
please cc to me. Some thing wrong with subscribing to the list for me. Dint
get confirmation.
--
*~Thanks & Regards~*
***
*
P.A.Eshan Sudharaka
Dept of Computer Science and Engineering
University of Moratuwa
Sri Lanka
http://esudharaka.blogspot.com/
Re: Unresolved references : how to fix
Posted by Eshan Sudharaka <es...@gmail.com>.
Thanks for the quick response. I did changes in the way you recommended. I
left import package as default. After creating the bundle it seems there are
some errors in manifest file. These errors occur due to import packages
which are generated default.
No available bundle exports package 'org.eclipse.osgi.service.systembundle'
- No available bundle exports package 'org.jivesoftware.smack.packet'
- No available bundle exports package 'org.scopemvc.controller.swing'
- No available bundle exports package 'com.caucho.hessian.client'
On Thu, Jun 23, 2011 at 6:22 PM, Stuart McCulloch <mc...@gmail.com> wrote:
> On 23 Jun 2011, at 11:46, Eshan Sudharaka wrote:
>
> > <plugin>
> > <groupId>org.apache.felix</groupId>
> > <artifactId>maven-bundle-plugin</artifactId>
> > <version>1.4.0</version>
>
> ^ this is quite an old version of the plugin, have you tried 2.3.4?
>
> > <extensions>true</extensions>
> > <configuration>
> > <manifestLocation>META-INF</manifestLocation>
> > <instructions>
> >
> <Include-Resource>target/classes</Include-Resource>
>
> ^ you shouldn't need this with 2.3.4 because it includes all local project
> classes/resources by default
>
> > <Bundle-SymbolicName>${bundle.symbolicName};singleton:=true
> > </Bundle-SymbolicName>
> > <Bundle-Version>${pom.version}</Bundle-Version>
> > <Require-Bundle>org.eclipse.core.runtime,
> > org.eclipse.core.resources,
> > org.eclipse.ui,
> > org.eclipse.jface
> > </Require-Bundle>
> > <Import-Package>!</Import-Package>
>
> ^ I assume this is because you're using Require-Bundle and you know (or
> trust) that those bundles contain all the packages you need? For a new
> bundle I would usually recommend leaving the Import-Package set to the
> default (ie. don't set it) and let bnd auto-generate the imports for you -
> ie. only use Require-Bundle when you need its additional semantics.
>
> FYI, if you're having issues with missing imports that you believe are
> optional then:
>
> <Import-Package>*;resolution:=optional</Import-Package>
>
> is one solution until you know for sure what the bundle needs and what it
> doesn't
>
> > <Private-Package>!</Private-Package>
>
> ^ the defaults are better in 2.3.4 so try leaving this instruction out as
> well
>
> > <Bundle-Activator>${bundle.namespace}.Activator
> > </Bundle-Activator>
> > <Embed-Dependency>
> > *;scope=compile|runtime|provided;inline=false;
> > </Embed-Dependency>
> > <Embed-Directory>target/dependency
> > </Embed-Directory>
> > <Embed-StripGroup>true</Embed-StripGroup>
> > </instructions>
> > </configuration>
> > </plugin>
> > <plugin>
> >
> > This is my felix pluging and when i try to build bundle it gives
> following
> > error.
> > * Unresolved references to [com.caucho.hessian.client,*
> >
> > In my pom file i do not have above dependencies. But it may has indirect
> > reference. How do i solve this ?
>
> ^ building with 2.3.4 and using "mvn -X clean install" should help - it
> will show what instructions / classpath are sent to bnd and what manifest is
> returned
>
> > please cc to me. Some thing wrong with subscribing to the list for me.
> Dint
> > get confirmation.
> >
> > --
> > *~Thanks & Regards~*
> > ***
> > *
> > P.A.Eshan Sudharaka
> > Dept of Computer Science and Engineering
> > University of Moratuwa
> > Sri Lanka
> > http://esudharaka.blogspot.com/
>
>
--
*~Thanks & Regards~*
***
*
P.A.Eshan Sudharaka
Dept of Computer Science and Engineering
University of Moratuwa
Sri Lanka
http://esudharaka.blogspot.com/
Re: Unresolved references : how to fix
Posted by Stuart McCulloch <mc...@gmail.com>.
On 23 Jun 2011, at 11:46, Eshan Sudharaka wrote:
> <plugin>
> <groupId>org.apache.felix</groupId>
> <artifactId>maven-bundle-plugin</artifactId>
> <version>1.4.0</version>
^ this is quite an old version of the plugin, have you tried 2.3.4?
> <extensions>true</extensions>
> <configuration>
> <manifestLocation>META-INF</manifestLocation>
> <instructions>
> <Include-Resource>target/classes</Include-Resource>
^ you shouldn't need this with 2.3.4 because it includes all local project classes/resources by default
> <Bundle-SymbolicName>${bundle.symbolicName};singleton:=true
> </Bundle-SymbolicName>
> <Bundle-Version>${pom.version}</Bundle-Version>
> <Require-Bundle>org.eclipse.core.runtime,
> org.eclipse.core.resources,
> org.eclipse.ui,
> org.eclipse.jface
> </Require-Bundle>
> <Import-Package>!</Import-Package>
^ I assume this is because you're using Require-Bundle and you know (or trust) that those bundles contain all the packages you need? For a new bundle I would usually recommend leaving the Import-Package set to the default (ie. don't set it) and let bnd auto-generate the imports for you - ie. only use Require-Bundle when you need its additional semantics.
FYI, if you're having issues with missing imports that you believe are optional then:
<Import-Package>*;resolution:=optional</Import-Package>
is one solution until you know for sure what the bundle needs and what it doesn't
> <Private-Package>!</Private-Package>
^ the defaults are better in 2.3.4 so try leaving this instruction out as well
> <Bundle-Activator>${bundle.namespace}.Activator
> </Bundle-Activator>
> <Embed-Dependency>
> *;scope=compile|runtime|provided;inline=false;
> </Embed-Dependency>
> <Embed-Directory>target/dependency
> </Embed-Directory>
> <Embed-StripGroup>true</Embed-StripGroup>
> </instructions>
> </configuration>
> </plugin>
> <plugin>
>
> This is my felix pluging and when i try to build bundle it gives following
> error.
> * Unresolved references to [com.caucho.hessian.client,*
>
> In my pom file i do not have above dependencies. But it may has indirect
> reference. How do i solve this ?
^ building with 2.3.4 and using "mvn -X clean install" should help - it will show what instructions / classpath are sent to bnd and what manifest is returned
> please cc to me. Some thing wrong with subscribing to the list for me. Dint
> get confirmation.
>
> --
> *~Thanks & Regards~*
> ***
> *
> P.A.Eshan Sudharaka
> Dept of Computer Science and Engineering
> University of Moratuwa
> Sri Lanka
> http://esudharaka.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org