Hi,

Felix and myself (well, basically Felix has done all the work and I did
just some minor enhancements) have put a new maven plugin into my sandbox.

The scr plugin generates the configuration file for the declarative
services based on javadoc tags in the source code. It generates the
component and metadata descriptors. Using the plugin is very easy if you
are also using the maven-bundle-plugin. Just add the scr plugin:
  <build>
    ...
    <plugins>
      ...
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-scr-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-scr-scrdescriptor</id>
            <goals>
              <goal>scr</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      ...
    </plugins>
    ...
  </build>

And add the javadoc tags to your source code, and everything else is
done by the plugin. For example adding a component just requires to add
a "@scr.component" to your javacode.

You'll find documentation here:
http://felix.apache.org/site/maven-scr-plugin-sandbox.html

This plugin makes developing services for OSGi very easy as you just
have to specify a few javadoc tags.

WDYT?

Carsten
-- 
Carsten Ziegeler
[EMAIL PROTECTED]

Reply via email to