Hi,

hi,
I faced some like this once.
It seems that maven-bundle-plugin adds an import-package declaration only when there are explicitly references to desired packages. by explicitly I mean, you must have a declaration of a parameter or an attribute.

even if you just add an not used "import org.talend.examples.crmservice.model.Customer;" to the class CRMServiceProxyFactory won't help. but if you declare an attribute, it adds.

as a workaround you will have to add the import statement into your pom. somethink like:
<Import-Package>org.talend.examples.crmservice.model, *</Import-Package>

regards,

Cristiano

On 09/09/13 13:33, Christian Schneider wrote:
Hi all,

I am wrapping webservice calls with OSGi service calls to hide the fact that web services are used.

To do so my typical setup for a service is:
common - service interface and data classes
service - service impl and cxf endpoint
client - Creates cxf proxy and publishes an OSGi service with the interface of the service

In user bundles I then just refer to the OSGi service and can access the remote service. I use blueprint to create the cxf endpoint and proxy and also to create the service.

My problem is with what the maven bundle plugin produces for the client module. The good thing is that it understands the <service> tag and automatically
imports the package of my service interface.

It does not import the other classes the service interface refers to though.

I have this interface:
package org.talend.examples.crmservice;

import org.talend.examples.crmservice.model.Customer;
public interface CRMService {
    Customer getCustomer(String id);
}

So the interface needs access to the Customer class. This is in a different package than the interface. The maven bundle plugin does not seem to detect this though and so does not import the org.talend.examples.crmservice.model package.

Is this a bug?

Here is my example if you want to take a look at it in detail:
https://github.com/cschneider/problem-maven-bundle-plugin

To keep it simple I did not use CXF and instead used the java Proxy class to create a dynamic proxy. CXF does the same behind the scenes.

Christian




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
For additional commands, e-mail: users-h...@felix.apache.org

Reply via email to