Index: dev-tools/maven/pom.xml.template
===================================================================
--- dev-tools/maven/pom.xml.template	(revision 1130132)
+++ dev-tools/maven/pom.xml.template	(working copy)
@@ -561,6 +561,31 @@
           </execution>
         </executions>
       </plugin>
+      
+      <!-- Adding OSGI metadata to the JAR without changing the packaging type. -->
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+          </archive>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <version>2.3.4</version>
+        <executions>
+          <execution>
+            <id>bundle-manifest</id>
+            <phase>process-classes</phase>
+            <goals>
+              <goal>manifest</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      
     </plugins>
   </build>
   <profiles>
