Author: iocanel
Date: Wed Oct 19 18:05:00 2011
New Revision: 1186371

URL: http://svn.apache.org/viewvc?rev=1186371&view=rev
Log:
[DIRECTMEMORY-12] Direct memory is now packaged as an OSGi bundle.

Modified:
    incubator/directmemory/trunk/directmemory-cache/pom.xml
    incubator/directmemory/trunk/pom.xml

Modified: incubator/directmemory/trunk/directmemory-cache/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/directmemory-cache/pom.xml?rev=1186371&r1=1186370&r2=1186371&view=diff
==============================================================================
--- incubator/directmemory/trunk/directmemory-cache/pom.xml (original)
+++ incubator/directmemory/trunk/directmemory-cache/pom.xml Wed Oct 19 18:05:00 
2011
@@ -31,11 +31,26 @@ under the License.
 
   <artifactId>directmemory-cache</artifactId>
   <name>Apache DirectMemory :: Cache</name>
+  <packaging>bundle</packaging>
   <description>DirectMemory Cache is a multi layered cache implementation 
featuring off-heap memory management (a-la
     BigMemory) to enable efficient handling of a large number of java objects 
without affecting jvm garbage collection
     performance
   </description>
 
+  <properties>
+    <osgi.import>
+      !org.apache.directmemory*,
+      com.dyuproject.protostuff*;version="[1,2)",
+      com.google.common.collect;version="[9.0,11)",
+      org.aspectj*;version="[1.6,2)",
+      org.josql*;version="[1.5,2)",
+      org.slf4j*,
+      *
+    </osgi.import>
+    
<osgi.export>org.apache.directmemory*;version="${project.version}</osgi.export>
+  </properties>
+
+
   <build>
     <plugins>
       <plugin>

Modified: incubator/directmemory/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/pom.xml?rev=1186371&r1=1186370&r2=1186371&view=diff
==============================================================================
--- incubator/directmemory/trunk/pom.xml (original)
+++ incubator/directmemory/trunk/pom.xml Wed Oct 19 18:05:00 2011
@@ -243,6 +243,7 @@ under the License.
 
     <!-- Plugin Versions -->
     <buildnumber-plugin.version>1.0</buildnumber-plugin.version>
+    <bundle-plugin.version>2.1.0</bundle-plugin.version>
     <clean-plugin.version>2.4.1</clean-plugin.version>
     <compiler-plugin.version>2.3.2</compiler-plugin.version>
     <gpg-plugin.version>1.4</gpg-plugin.version>
@@ -255,6 +256,14 @@ under the License.
     <report-plugin.version>0.1</report-plugin.version>
     <site-plugin.version>3.0</site-plugin.version>
     <source-plugin.version>2.1.2</source-plugin.version>
+
+    <!-- Bundle Headers -->
+    <osgi.activator/>
+    <osgi.bundles/>
+    <osgi.dynamic.import/>
+    <osgi.export/>
+    <osgi.import/>
+    <osgi.private/>
   </properties>
 
   <build>
@@ -305,6 +314,40 @@ under the License.
 
     <plugins>
       <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <version>${bundle-plugin.version}</version>
+        <extensions>true</extensions>
+        <inherited>true</inherited>
+        <configuration>
+          <instructions>
+            <Bundle-Name>${project.name}</Bundle-Name>
+            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+            <Export-Package>${osgi.export}</Export-Package>
+            <Import-Package>${osgi.import}</Import-Package>
+            
<DynamicImport-Package>${osgi.dynamic.import}</DynamicImport-Package>
+            <Private-Package>${osgi.private}</Private-Package>
+            <Require-Bundle>${osgi.bundles}</Require-Bundle>
+            <Bundle-Activator>${osgi.activator}</Bundle-Activator>
+          </instructions>
+          <supportedProjectTypes>
+            <supportedProjectType>jar</supportedProjectType>
+            <supportedProjectType>war</supportedProjectType>
+            <supportedProjectType>bundle</supportedProjectType>
+          </supportedProjectTypes>
+          <unpackBundle>true</unpackBundle>
+        </configuration>
+        <executions>
+          <execution>
+            <id>bundle-manifest</id>
+            <phase>process-classes</phase>
+            <goals>
+              <goal>manifest</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
         <groupId>org.apache.rat</groupId>
         <artifactId>apache-rat-plugin</artifactId>
         <version>${rat-plugin.version}</version>
@@ -372,6 +415,7 @@ under the License.
         <version>${jar-plugin.version}</version>
         <configuration>
           <archive>
+            
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
             <manifestEntries>
               <Specification-Title>${project.name}</Specification-Title>
               <Specification-Version>${project.version}</Specification-Version>


Reply via email to