felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bokie <jms.cer...@gmail.com>
Subject Re: Maven and declarative services
Date Mon, 17 Mar 2014 23:36:12 GMT
Hi Scott, thanks for the reply.

*<Service-Component>*</Service-Component>* works nicely on the annotations
in the  *aQute.bnd.annotation.component* package but not on the annotations
in the *org.osgi.service.component.annotations* package - no DS descriptor
gets generated.

*POM:*
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.4.0</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Service-Component>*</Service-Component>
          </instructions>
        </configuration>
      </plugin>

*COMPONENT:*
import org.osgi.service.component.ComponentContext;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Deactivate;

@Component(xmlns = "http://www.osgi.org/xmlns/scr/v1.2.0")
public final class TestComponent {

  @Activate
  public void activate(final ComponentContext context) {}

  @Deactivate
  public void deactivate(final ComponentContext context) {}
}





--
View this message in context: http://apache-felix.18485.x6.nabble.com/Maven-and-declarative-services-tp5007718p5007721.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


Mime
View raw message