You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by dw...@apache.org on 2010/01/22 17:52:57 UTC

svn commit: r902170 - in /openjpa/branches/1.3.x: openjpa/pom.xml pom.xml

Author: dwoods
Date: Fri Jan 22 16:52:57 2010
New Revision: 902170

URL: http://svn.apache.org/viewvc?rev=902170&view=rev
Log:
OPENJPA-1478 add OSGi metadata back into openjpa.jar artifact for Apache Aries team.  Also updated to latest maven-bundle-plugin version.

Modified:
    openjpa/branches/1.3.x/openjpa/pom.xml
    openjpa/branches/1.3.x/pom.xml

Modified: openjpa/branches/1.3.x/openjpa/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa/pom.xml?rev=902170&r1=902169&r2=902170&view=diff
==============================================================================
--- openjpa/branches/1.3.x/openjpa/pom.xml (original)
+++ openjpa/branches/1.3.x/openjpa/pom.xml Fri Jan 22 16:52:57 2010
@@ -24,7 +24,7 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
     <modelVersion>4.0.0</modelVersion>
     <artifactId>openjpa</artifactId>
-    <packaging>jar</packaging>
+    <packaging>bundle</packaging>
     <name>OpenJPA Aggregate Jar</name>
     <parent>
         <groupId>org.apache.openjpa</groupId>
@@ -105,6 +105,49 @@
                     </execution>
                 </executions>
             </plugin>
+
+            <!-- extract the shaded jar so a bundle can be created -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <unzip src="${project.build.directory}/${pom.artifactId}-${pom.version}.jar" dest="${project.build.directory}/classes"/>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <!-- create an OSGi bundle -->
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <!-- OSGi Bundle Metadata -->
+                        <Bundle-DocURL>${project.url}</Bundle-DocURL>
+                        <Private-Package />
+                        <Export-Package>org.apache.openjpa.*;version=${pom.version}</Export-Package>
+                        <Import-Package>com.ibm.*;resolution:=optional,org.postg
+resql.*;resolution:=optional,org.apache.tools.ant.*;resolution:=optional,org.apa
+che.log4j.*;resolution:=optional,javax.activation.xa*;resolution:=optional,javax
+.jms.*;resolution:=optional,javax.transaction.*;resolution:=optional,javax.valid
+ation.*;resolution:=optional,javax.xml.bind.*;resolution:=optional,serp.*;resolu
+tion:=optional,*</Import-Package>
+                        <!-- Eclipse metadata -->
+                        <Eclipse-Autostart>false</Eclipse-Autostart>
+                        <Bundle-ClassPath>.</Bundle-ClassPath>
+                    </instructions>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 

Modified: openjpa/branches/1.3.x/pom.xml
URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/pom.xml?rev=902170&r1=902169&r2=902170&view=diff
==============================================================================
--- openjpa/branches/1.3.x/pom.xml (original)
+++ openjpa/branches/1.3.x/pom.xml Fri Jan 22 16:52:57 2010
@@ -754,7 +754,7 @@
                 <plugin>
                     <groupId>org.apache.felix</groupId>
                     <artifactId>maven-bundle-plugin</artifactId>
-                    <version>1.4.3</version>
+                    <version>2.0.0</version>
                 </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>