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