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