Blame SOURCES/0001-Generate-different-Bundle-SymbolicName-for-different.patch

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