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