d379f4
From d71aa7acc93b944b159ac63f85d9ba1a566f5a8d Mon Sep 17 00:00:00 2001
d379f4
From: Mikolaj Izdebski <mizdebsk@redhat.com>
d379f4
Date: Tue, 29 Jul 2014 09:00:03 +0200
d379f4
Subject: [PATCH 1/2] Generate different Bundle-SymbolicName for different JARs
d379f4
d379f4
---
d379f4
 pom.xml | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
d379f4
 1 file changed, 55 insertions(+)
d379f4
d379f4
diff --git a/pom.xml b/pom.xml
d379f4
index cdad31c..5707595 100644
d379f4
--- a/pom.xml
d379f4
+++ b/pom.xml
d379f4
@@ -179,6 +179,52 @@ under the License.
d379f4
   <build>
d379f4
     <plugins>
d379f4
 
d379f4
+      <plugin>
d379f4
+        <groupId>org.apache.felix</groupId>
d379f4
+        <artifactId>maven-bundle-plugin</artifactId>
d379f4
+        <executions>
d379f4
+          <execution>
d379f4
+            <id>tests-bundle-manifest</id>
d379f4
+            <phase>process-classes</phase>
d379f4
+            <goals>
d379f4
+              <goal>manifest</goal>
d379f4
+            </goals>
d379f4
+            <configuration>
d379f4
+              <manifestLocation>${project.build.directory}/osgi-tests</manifestLocation>
d379f4
+              <instructions>
d379f4
+                <Bundle-SymbolicName>${commons.osgi.symbolicName}.tests</Bundle-SymbolicName>
d379f4
+              </instructions>
d379f4
+            </configuration>
d379f4
+          </execution>
d379f4
+          <execution>
d379f4
+            <id>api-bundle-manifest</id>
d379f4
+            <phase>process-classes</phase>
d379f4
+            <goals>
d379f4
+              <goal>manifest</goal>
d379f4
+            </goals>
d379f4
+            <configuration>
d379f4
+              <manifestLocation>${project.build.directory}/osgi-api</manifestLocation>
d379f4
+              <instructions>
d379f4
+                <Bundle-SymbolicName>${commons.osgi.symbolicName}.api</Bundle-SymbolicName>
d379f4
+              </instructions>
d379f4
+            </configuration>
d379f4
+          </execution>
d379f4
+          <execution>
d379f4
+            <id>adapters-bundle-manifest</id>
d379f4
+            <phase>process-classes</phase>
d379f4
+            <goals>
d379f4
+              <goal>manifest</goal>
d379f4
+            </goals>
d379f4
+            <configuration>
d379f4
+              <manifestLocation>${project.build.directory}/osgi-adapters</manifestLocation>
d379f4
+              <instructions>
d379f4
+                <Bundle-SymbolicName>${commons.osgi.symbolicName}.adapters</Bundle-SymbolicName>
d379f4
+              </instructions>
d379f4
+            </configuration>
d379f4
+          </execution>
d379f4
+        </executions>
d379f4
+      </plugin>
d379f4
+
d379f4
       
d379f4
         - We want to create four jarfiles from this project: normal, tests, api
d379f4
         - and adapters. The first two are handled by the normal jar:jar and
d379f4
@@ -202,6 +248,9 @@ under the License.
d379f4
             </goals>
d379f4
             <configuration>
d379f4
               <jarName>commons-logging</jarName>
d379f4
+              <archive>
d379f4
+                <manifestFile>${project.build.directory}/osgi-tests/MANIFEST.MF</manifestFile>
d379f4
+              </archive>
d379f4
             </configuration>
d379f4
           </execution>
d379f4
 
d379f4
@@ -213,6 +262,9 @@ under the License.
d379f4
             </goals>
d379f4
             <configuration>
d379f4
               <jarName>${project.artifactId}-api-${project.version}</jarName>
d379f4
+              <archive>
d379f4
+                <manifestFile>${project.build.directory}/osgi-api/MANIFEST.MF</manifestFile>
d379f4
+              </archive>
d379f4
               <includes>
d379f4
                 <include>org/apache/commons/logging/*.class</include>
d379f4
                 <include>org/apache/commons/logging/impl/LogFactoryImpl*.class</include>
d379f4
@@ -237,6 +289,9 @@ under the License.
d379f4
             </goals>
d379f4
             <configuration>
d379f4
               <jarName>${project.artifactId}-adapters-${project.version}</jarName>
d379f4
+              <archive>
d379f4
+                <manifestFile>${project.build.directory}/osgi-adapters/MANIFEST.MF</manifestFile>
d379f4
+              </archive>
d379f4
               <includes>
d379f4
                 <include>org/apache/commons/logging/impl/**.class</include>
d379f4
                 <include>META-INF/LICENSE.txt</include>
d379f4
-- 
d379f4
2.5.5
d379f4