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