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