You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cl...@apache.org on 2011/11/30 17:53:40 UTC

svn commit: r1208515 - in /felix/trunk/ipojo: bnd-ipojo-plugin/ bnd-ipojo-plugin/src/main/java/org/apache/felix/ipojo/bnd/ bnd-ipojo-plugin/src/test/ bnd-ipojo-plugin/src/test/java/ bnd-ipojo-plugin/src/test/java/org/ bnd-ipojo-plugin/src/test/java/org...

Author: clement
Date: Wed Nov 30 16:53:38 2011
New Revision: 1208515

URL: http://svn.apache.org/viewvc?rev=1208515&view=rev
Log:
Fix FELIX-3249:
* Applied patch from Guillaume
* junit4osgi now uses the bnd ipojo plugin

Added:
    felix/trunk/ipojo/bnd-ipojo-plugin/src/test/
    felix/trunk/ipojo/bnd-ipojo-plugin/src/test/java/
    felix/trunk/ipojo/bnd-ipojo-plugin/src/test/java/org/
    felix/trunk/ipojo/bnd-ipojo-plugin/src/test/java/org/apache/
    felix/trunk/ipojo/bnd-ipojo-plugin/src/test/java/org/apache/felix/
    felix/trunk/ipojo/bnd-ipojo-plugin/src/test/java/org/apache/felix/ipojo/
    felix/trunk/ipojo/bnd-ipojo-plugin/src/test/java/org/apache/felix/ipojo/bnd/
    felix/trunk/ipojo/bnd-ipojo-plugin/src/test/java/org/apache/felix/ipojo/bnd/PojoizationPluginTestCase.java
    felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/
    felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/metadata-components-and-instances.xml
    felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/metadata-components-only.xml
    felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/metadata-instances-only.xml
Modified:
    felix/trunk/ipojo/bnd-ipojo-plugin/pom.xml
    felix/trunk/ipojo/bnd-ipojo-plugin/src/main/java/org/apache/felix/ipojo/bnd/BndJarResourceStore.java
    felix/trunk/ipojo/junit4osgi/junit4osgi/pom.xml

Modified: felix/trunk/ipojo/bnd-ipojo-plugin/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/bnd-ipojo-plugin/pom.xml?rev=1208515&r1=1208514&r2=1208515&view=diff
==============================================================================
--- felix/trunk/ipojo/bnd-ipojo-plugin/pom.xml (original)
+++ felix/trunk/ipojo/bnd-ipojo-plugin/pom.xml Wed Nov 30 16:53:38 2011
@@ -17,59 +17,56 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.apache.felix</groupId>
-    <artifactId>felix-parent</artifactId>
-    <version>1.2.1</version>
-    <relativePath>../../pom/pom.xml</relativePath>
-  </parent>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>felix-parent</artifactId>
+        <version>1.2.1</version>
+        <relativePath>../../pom/pom.xml</relativePath>
+    </parent>
 
-  <artifactId>bnd-ipojo-plugin</artifactId>
-  <version>1.0.0-SNAPSHOT</version>
+    <artifactId>bnd-ipojo-plugin</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
     <name>Apache Felix iPOJO Bnd Plugin</name>
 
-  <developers>
-    <developer>
-      <name>Guillaume Sauthier</name>
-      <organization>OW2 Consortium</organization>
-      <roles>
-        <role>developer</role>
-      </roles>
-    </developer>
-  </developers>
+    <dependencies>
+        <dependency>
+            <groupId>biz.aQute</groupId>
+            <artifactId>bndlib</artifactId>
+            <version>1.43.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.manipulator</artifactId>
+            <version>1.9.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.annotations</artifactId>
+            <version>1.8.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <version>1.8.5</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
 
-  <dependencies>
-    <dependency>
-      <groupId>biz.aQute</groupId>
-      <artifactId>bndlib</artifactId>
-      <version>1.43.0</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.ipojo.manipulator</artifactId>
-      <version>1.9.0-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.ipojo.annotations</artifactId>
-      <version>1.8.0</version>
-    </dependency>
-  </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-    
 </project>
\ No newline at end of file

Modified: felix/trunk/ipojo/bnd-ipojo-plugin/src/main/java/org/apache/felix/ipojo/bnd/BndJarResourceStore.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/bnd-ipojo-plugin/src/main/java/org/apache/felix/ipojo/bnd/BndJarResourceStore.java?rev=1208515&r1=1208514&r2=1208515&view=diff
==============================================================================
--- felix/trunk/ipojo/bnd-ipojo-plugin/src/main/java/org/apache/felix/ipojo/bnd/BndJarResourceStore.java (original)
+++ felix/trunk/ipojo/bnd-ipojo-plugin/src/main/java/org/apache/felix/ipojo/bnd/BndJarResourceStore.java Wed Nov 30 16:53:38 2011
@@ -44,9 +44,10 @@ public class BndJarResourceStore impleme
 
     private MetadataRenderer m_renderer = new MetadataRenderer();
 
-    private Element m_metadata;
+    private List<Element> m_metadata;
 
     public BndJarResourceStore(Analyzer analyzer, Reporter reporter) {
+        m_metadata = new ArrayList<Element>();
         m_analyzer = analyzer;
         m_reporter = reporter;
     }
@@ -86,7 +87,7 @@ public class BndJarResourceStore impleme
     }
 
     public void writeMetadata(Element metadata) {
-        m_metadata = metadata;
+        m_metadata.add(metadata);
 
         // Find referred packages and add them into Bnd
         for (String referred : Metadatas.findReferredPackages(metadata)) {
@@ -97,7 +98,6 @@ public class BndJarResourceStore impleme
         }
 
         // IPOJO-Components will be written during the close method.
-
     }
 
     public void write(String resourcePath, byte[] resource) throws IOException {
@@ -107,13 +107,10 @@ public class BndJarResourceStore impleme
 
     public void close() throws IOException {
         // Write the iPOJO header (including manipulation metadata)
-        String components = m_analyzer.getProperty("IPOJO-Components");
         StringBuilder builder = new StringBuilder();
-
-        if (components != null) {
-            builder.append(components);
+        for (Element metadata : m_metadata) {
+            builder.append(m_renderer.render(metadata));
         }
-        builder.append(m_renderer.render(m_metadata));
 
         if (builder.length() != 0) {
             m_analyzer.setProperty("IPOJO-Components", builder.toString());

Added: felix/trunk/ipojo/bnd-ipojo-plugin/src/test/java/org/apache/felix/ipojo/bnd/PojoizationPluginTestCase.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/bnd-ipojo-plugin/src/test/java/org/apache/felix/ipojo/bnd/PojoizationPluginTestCase.java?rev=1208515&view=auto
==============================================================================
--- felix/trunk/ipojo/bnd-ipojo-plugin/src/test/java/org/apache/felix/ipojo/bnd/PojoizationPluginTestCase.java (added)
+++ felix/trunk/ipojo/bnd-ipojo-plugin/src/test/java/org/apache/felix/ipojo/bnd/PojoizationPluginTestCase.java Wed Nov 30 16:53:38 2011
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.ipojo.bnd;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import aQute.lib.osgi.Analyzer;
+import aQute.lib.osgi.Jar;
+import aQute.lib.osgi.Resource;
+import aQute.lib.osgi.URLResource;
+import aQute.libg.reporter.Reporter;
+import junit.framework.TestCase;
+import org.easymock.EasyMock;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.mockito.Spy;
+
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.when;
+
+public class PojoizationPluginTestCase extends TestCase {
+
+    @Mock
+    private Reporter reporter;
+
+    @Spy
+    private Analyzer analyzer = new Analyzer();
+
+    @Spy
+    private Jar jar = new Jar("mock.jar");
+
+    @Override
+    public void setUp() throws Exception {
+        MockitoAnnotations.initMocks(this);
+    }
+
+    public void testAnalysisWithComponentOnlyMetadataXml() throws Exception {
+        PojoizationPlugin plugin = new PojoizationPlugin();
+
+        Map<String, String> props = new HashMap<String, String>();
+
+        Resource resource = new URLResource(getClass().getResource("/metadata-components-only.xml"));
+        doReturn(jar).when(analyzer).getJar();
+        doReturn(resource).when(jar).getResource(eq("META-INF/metadata.xml"));
+
+        plugin.setReporter(reporter);
+        plugin.setProperties(props);
+
+        plugin.analyzeJar(analyzer);
+
+        assertEquals("component { $class=\"com.acme.Thermometer\" }",
+                analyzer.getProperty("IPOJO-Components"));
+    }
+
+    public void testAnalysisWithInstanceOnlyMetadataXml() throws Exception {
+        PojoizationPlugin plugin = new PojoizationPlugin();
+
+        Map<String, String> props = new HashMap<String, String>();
+
+        Resource resource = new URLResource(getClass().getResource("/metadata-instances-only.xml"));
+        doReturn(jar).when(analyzer).getJar();
+        doReturn(resource).when(jar).getResource(eq("META-INF/metadata.xml"));
+
+        plugin.setReporter(reporter);
+        plugin.setProperties(props);
+
+        plugin.analyzeJar(analyzer);
+
+        assertEquals("instance { $component=\"com.acme.Thermometer\" }",
+                analyzer.getProperty("IPOJO-Components"));
+    }
+
+    public void testAnalysisWithComponentsAndInstancesMetadataXml() throws Exception {
+        PojoizationPlugin plugin = new PojoizationPlugin();
+
+        Map<String, String> props = new HashMap<String, String>();
+
+        Resource resource = new URLResource(getClass().getResource("/metadata-components-and-instances.xml"));
+        doReturn(jar).when(analyzer).getJar();
+        doReturn(resource).when(jar).getResource(eq("META-INF/metadata.xml"));
+
+        plugin.setReporter(reporter);
+        plugin.setProperties(props);
+
+        plugin.analyzeJar(analyzer);
+
+        assertEquals("component { $class=\"com.acme.Thermometer\" }" +
+                     "instance { $component=\"com.acme.Thermometer\" }" +
+                     "instance { $component=\"com.acme.Thermometer\" }",
+                     analyzer.getProperty("IPOJO-Components"));
+    }
+}

Added: felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/metadata-components-and-instances.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/metadata-components-and-instances.xml?rev=1208515&view=auto
==============================================================================
--- felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/metadata-components-and-instances.xml (added)
+++ felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/metadata-components-and-instances.xml Wed Nov 30 16:53:38 2011
@@ -0,0 +1,5 @@
+<ipojo>
+  <component class="com.acme.Thermometer" />
+  <instance component="com.acme.Thermometer" />
+  <instance component="com.acme.Thermometer" />
+</ipojo>

Added: felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/metadata-components-only.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/metadata-components-only.xml?rev=1208515&view=auto
==============================================================================
--- felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/metadata-components-only.xml (added)
+++ felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/metadata-components-only.xml Wed Nov 30 16:53:38 2011
@@ -0,0 +1,3 @@
+<ipojo>
+  <component class="com.acme.Thermometer"/>
+</ipojo>

Added: felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/metadata-instances-only.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/metadata-instances-only.xml?rev=1208515&view=auto
==============================================================================
--- felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/metadata-instances-only.xml (added)
+++ felix/trunk/ipojo/bnd-ipojo-plugin/src/test/resources/metadata-instances-only.xml Wed Nov 30 16:53:38 2011
@@ -0,0 +1,3 @@
+<ipojo>
+    <instance component="com.acme.Thermometer"/>
+</ipojo>
\ No newline at end of file

Modified: felix/trunk/ipojo/junit4osgi/junit4osgi/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/junit4osgi/junit4osgi/pom.xml?rev=1208515&r1=1208514&r2=1208515&view=diff
==============================================================================
--- felix/trunk/ipojo/junit4osgi/junit4osgi/pom.xml (original)
+++ felix/trunk/ipojo/junit4osgi/junit4osgi/pom.xml Wed Nov 30 16:53:38 2011
@@ -16,124 +16,137 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.apache.felix</groupId>
-    <artifactId>felix-parent</artifactId>
-    <version>1.2.1</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <packaging>bundle</packaging>
-  <name>Junit4Osgi</name>
-  <artifactId>org.apache.felix.ipojo.junit4osgi</artifactId>
-  <version>1.1.0-SNAPSHOT</version>
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.ipojo</artifactId>
-      <version>1.8.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.ipojo.metadata</artifactId>
-      <version>1.4.0</version>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-    </dependency>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.core</artifactId>
-      <version>4.2.0</version>
-    </dependency>
-  </dependencies>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.4</source>
-          <target>1.4</target>
-        </configuration>
-      </plugin>
-      <plugin>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
         <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.5</version>
-        <extensions>true</extensions>
-        <configuration>
-          <instructions>
-            <Bundle-Name>
-              Apache Felix iPOJO OSGi Junit Runner
-            </Bundle-Name>
-            <Bundle-SymbolicName>
-              ${project.artifactId}
-            </Bundle-SymbolicName>
-            <Private-Package>
-              org.apache.felix.ipojo.junit4osgi.impl,
-              org.apache.felix.ipojo.junit4osgi.test,
-            </Private-Package>
-            <Export-Package>
-              org.apache.felix.ipojo.junit4osgi,
-              org.apache.felix.ipojo.junit4osgi.helpers,
-              junit.*
-            </Export-Package>
-            <Import-Package>!javax.swing*, *</Import-Package>
-            <Test-Suite>
-              org.apache.felix.ipojo.junit4osgi.test.TestTestCase,
-              org.apache.felix.ipojo.junit4osgi.test.TestOSGiTestCase,
-              org.apache.felix.ipojo.junit4osgi.test.TestTestSuite,
-              org.apache.felix.ipojo.junit4osgi.test.TestOSGiTestSuite,
-            </Test-Suite>
-            <Include-Resource>
-              META-INF/LICENSE=LICENSE,
-              META-INF/LICENSE.junit=LICENSE.junit,
-              META-INF/NOTICE=NOTICE
-            </Include-Resource>
-          </instructions>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-ipojo-plugin</artifactId>
-        <version>1.9.0-SNAPSHOT</version>
-        <executions>
-          <execution>
-            <goals>
-              <goal>ipojo-bundle</goal>
-            </goals>
-            <configuration>
-              <ignoreAnnotations>true</ignoreAnnotations>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>rat-maven-plugin</artifactId>
-        <configuration>
-          <excludeSubProjects>false</excludeSubProjects>
-          <useEclipseDefaultExcludes>true</useEclipseDefaultExcludes>
-          <useMavenDefaultExcludes>true</useMavenDefaultExcludes>
-          <excludes>
-            <param>doc/*</param>
-            <param>maven-eclipse.xml</param>
-            <param>.checkstyle</param>
-            <param>.externalToolBuilders/*</param>
-          </excludes>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-        <configuration>
-          <configLocation>http://felix.apache.org/ipojo/dev/checkstyle_ipojo.xml</configLocation>
-          <violationSeverity>error</violationSeverity>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
+        <artifactId>felix-parent</artifactId>
+        <version>1.2.1</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>bundle</packaging>
+    <name>Junit4Osgi</name>
+    <artifactId>org.apache.felix.ipojo.junit4osgi</artifactId>
+    <version>1.1.0-SNAPSHOT</version>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo</artifactId>
+            <version>1.8.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.metadata</artifactId>
+            <version>1.4.0</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>3.8.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>4.2.0</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.4</source>
+                    <target>1.4</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>2.3.5</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-Name>
+                            Apache Felix iPOJO OSGi Junit Runner
+                        </Bundle-Name>
+                        <Bundle-SymbolicName>
+                            ${project.artifactId}
+                        </Bundle-SymbolicName>
+                        <Private-Package>
+                            org.apache.felix.ipojo.junit4osgi.impl,
+                            org.apache.felix.ipojo.junit4osgi.test,
+                        </Private-Package>
+                        <Export-Package>
+                            org.apache.felix.ipojo.junit4osgi,
+                            org.apache.felix.ipojo.junit4osgi.helpers,
+                            junit.*
+                        </Export-Package>
+                        <Import-Package>!javax.swing*, *</Import-Package>
+                        <Test-Suite>
+                            org.apache.felix.ipojo.junit4osgi.test.TestTestCase,
+                            org.apache.felix.ipojo.junit4osgi.test.TestOSGiTestCase,
+                            org.apache.felix.ipojo.junit4osgi.test.TestTestSuite,
+                            org.apache.felix.ipojo.junit4osgi.test.TestOSGiTestSuite,
+                        </Test-Suite>
+                        <Include-Resource>
+                            META-INF/LICENSE=LICENSE,
+                            META-INF/LICENSE.junit=LICENSE.junit,
+                            META-INF/NOTICE=NOTICE
+                        </Include-Resource>
+                        <_plugin>
+                            org.apache.felix.ipojo.bnd.PojoizationPlugin;metadata=${basedir}/metadata.xml;use-local-schemas=true
+                        </_plugin>
+                    </instructions>
+                </configuration>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.apache.felix</groupId>
+                        <artifactId>bnd-ipojo-plugin</artifactId>
+                        <version>1.0.0-SNAPSHOT</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+            <!--
+            Use the BND-iPOJO-Plugin
+            <plugin>
+              <groupId>org.apache.felix</groupId>
+              <artifactId>maven-ipojo-plugin</artifactId>
+              <version>1.9.0-SNAPSHOT</version>
+              <executions>
+                <execution>
+                  <goals>
+                    <goal>ipojo-bundle</goal>
+                  </goals>
+                  <configuration>
+                    <ignoreAnnotations>true</ignoreAnnotations>
+                  </configuration>
+                </execution>
+              </executions>
+            </plugin>-->
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>rat-maven-plugin</artifactId>
+                <configuration>
+                    <excludeSubProjects>false</excludeSubProjects>
+                    <useEclipseDefaultExcludes>true</useEclipseDefaultExcludes>
+                    <useMavenDefaultExcludes>true</useMavenDefaultExcludes>
+                    <excludes>
+                        <param>doc/*</param>
+                        <param>maven-eclipse.xml</param>
+                        <param>.checkstyle</param>
+                        <param>.externalToolBuilders/*</param>
+                    </excludes>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <configuration>
+                    <configLocation>http://felix.apache.org/ipojo/dev/checkstyle_ipojo.xml</configLocation>
+                    <violationSeverity>error</violationSeverity>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>