You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by dj...@apache.org on 2009/12/03 09:10:34 UTC

svn commit: r886700 - in /portals/pluto/trunk: pluto-container-api/pom.xml pluto-container-driver-api/pom.xml pluto-container/pom.xml pluto-portal-driver-impl/pom.xml pluto-portal-driver/pom.xml pluto-taglib/pom.xml pluto-util/pom.xml pom.xml

Author: djencks
Date: Thu Dec  3 08:10:31 2009
New Revision: 886700

URL: http://svn.apache.org/viewvc?rev=886700&view=rev
Log:
PLUTO-585 use the felix maven plugin to build osgi bundles instead of plain jars. Make some osgi package imports optional. Not yet completely running in an osgi environment but jars at least load.

Modified:
    portals/pluto/trunk/pluto-container-api/pom.xml
    portals/pluto/trunk/pluto-container-driver-api/pom.xml
    portals/pluto/trunk/pluto-container/pom.xml
    portals/pluto/trunk/pluto-portal-driver-impl/pom.xml
    portals/pluto/trunk/pluto-portal-driver/pom.xml
    portals/pluto/trunk/pluto-taglib/pom.xml
    portals/pluto/trunk/pluto-util/pom.xml
    portals/pluto/trunk/pom.xml

Modified: portals/pluto/trunk/pluto-container-api/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-api/pom.xml?rev=886700&r1=886699&r2=886700&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-api/pom.xml (original)
+++ portals/pluto/trunk/pluto-container-api/pom.xml Thu Dec  3 08:10:31 2009
@@ -27,6 +27,7 @@
 	</parent>
 
 	<artifactId>pluto-container-api</artifactId>
+    <packaging>bundle</packaging>
 	<name>Apache Pluto Container API</name>
 	
 	<dependencies>
@@ -51,6 +52,21 @@
     
 	</dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+              <groupId>org.apache.felix</groupId>
+              <artifactId>maven-bundle-plugin</artifactId>
+              <configuration>
+                <instructions>
+                    <Import-Package>javax.ccpp;resolution:=optional,*</Import-Package>
+                </instructions>
+              </configuration>
+            </plugin>
+        </plugins>
+
+    </build>
+
     <!-- Don't create distribution artifacts -->
     <profiles>
         <profile>

Modified: portals/pluto/trunk/pluto-container-driver-api/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container-driver-api/pom.xml?rev=886700&r1=886699&r2=886700&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container-driver-api/pom.xml (original)
+++ portals/pluto/trunk/pluto-container-driver-api/pom.xml Thu Dec  3 08:10:31 2009
@@ -27,7 +27,7 @@
 	</parent>
 
 	<artifactId>pluto-container-driver-api</artifactId>
-	<packaging>jar</packaging>
+    <packaging>bundle</packaging>
 	<name>Apache Pluto Container Driver API</name>
 	
 	<dependencies>
@@ -57,7 +57,21 @@
             <scope>compile</scope>
         </dependency>
 	</dependencies>
+    <build>
+        <plugins>
+            <plugin>
+              <groupId>org.apache.felix</groupId>
+              <artifactId>maven-bundle-plugin</artifactId>
+              <configuration>
+                <instructions>
+                    <Import-Package>javax.ccpp;resolution:=optional,*</Import-Package>
+                </instructions>
+              </configuration>
+            </plugin>
+        </plugins>
 
+    </build>
+   
     <!-- Don't create distribution artifacts -->
     <profiles>
         <profile>

Modified: portals/pluto/trunk/pluto-container/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-container/pom.xml?rev=886700&r1=886699&r2=886700&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-container/pom.xml (original)
+++ portals/pluto/trunk/pluto-container/pom.xml Thu Dec  3 08:10:31 2009
@@ -27,6 +27,7 @@
     </parent>
   
     <artifactId>pluto-container</artifactId>
+    <packaging>bundle</packaging>
     <name>Apache Pluto Portlet Container</name>
     <description>The Apache Pluto portlet container.</description>
 
@@ -145,6 +146,20 @@
                     </excludes>
                 </configuration>
             </plugin>
+            <plugin>
+              <groupId>org.apache.felix</groupId>
+              <artifactId>maven-bundle-plugin</artifactId>
+              <configuration>
+                <instructions>
+                    <Export-Package>org.apache.pluto.container.impl,
+                        org.apache.pluto.container.om.portlet.impl,
+                        org.apache.pluto.container.om.portlet10.impl,
+                        org.apache.pluto.container.util
+                    </Export-Package>
+                    <Import-Package>javax.ccpp;resolution:=optional,*</Import-Package>
+                </instructions>
+              </configuration>
+            </plugin>
         </plugins>
     </build>
 

Modified: portals/pluto/trunk/pluto-portal-driver-impl/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver-impl/pom.xml?rev=886700&r1=886699&r2=886700&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver-impl/pom.xml (original)
+++ portals/pluto/trunk/pluto-portal-driver-impl/pom.xml Thu Dec  3 08:10:31 2009
@@ -27,6 +27,7 @@
     </parent>
 
     <artifactId>pluto-portal-driver-impl</artifactId>
+    <packaging>bundle</packaging>
     <name>Apache Pluto Portal Driver Implementation Classes</name>
 
     <dependencies>
@@ -134,6 +135,25 @@
         </dependency>
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+              <groupId>org.apache.felix</groupId>
+              <artifactId>maven-bundle-plugin</artifactId>
+              <configuration>
+                <instructions>
+                    <Export-Package>org.apache.pluto.driver.config.impl,
+                        org.apache.pluto.driver.services.container,
+                        org.apache.pluto.driver.services.impl.resource,
+                        org.apache.pluto.driver.url.impl
+                    </Export-Package>
+                    <Import-Package>javax.ccpp;resolution:=optional,*</Import-Package>
+                </instructions>
+              </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
     <!-- Don't create distribution artifacts -->
     <profiles>
         <profile>

Modified: portals/pluto/trunk/pluto-portal-driver/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-portal-driver/pom.xml?rev=886700&r1=886699&r2=886700&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal-driver/pom.xml (original)
+++ portals/pluto/trunk/pluto-portal-driver/pom.xml Thu Dec  3 08:10:31 2009
@@ -17,7 +17,8 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<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">
+<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>
     <parent>
@@ -27,6 +28,7 @@
     </parent>
 
     <artifactId>pluto-portal-driver</artifactId>
+    <packaging>bundle</packaging>
     <name>Apache Pluto Portal Driver</name>
 
     <dependencies>
@@ -65,17 +67,17 @@
             <artifactId>servlet-api</artifactId>
             <scope>provided</scope>
         </dependency>
-      <!--  CCPP Libraries -->
+        <!--  CCPP Libraries -->
         <dependency>
             <groupId>javax.ccpp</groupId>
             <artifactId>ccpp</artifactId>
             <scope>provided</scope>
         </dependency>
         <dependency>
-		    <groupId>javax.servlet</groupId>
-		    <artifactId>jsp-api</artifactId>
-		    <scope>provided</scope>
-   	    </dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>jsp-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
         <dependency>
             <groupId>javax.servlet</groupId>
             <artifactId>jstl</artifactId>
@@ -123,8 +125,8 @@
             <groupId>commons-io</groupId>
             <artifactId>commons-io</artifactId>
         </dependency>
-  
-    <!-- Testing Libraries ================================================= -->
+
+        <!-- Testing Libraries ================================================= -->
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-jdk14</artifactId>
@@ -149,11 +151,26 @@
 
     <build>
         <resources>
-             <resource>
-                 <directory>src/main/resources</directory>
-                 <filtering>true</filtering>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
             </resource>
-       </resources>        
+        </resources>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Import-Package>javax.ccpp;resolution:=optional,
+                            org.springframework.web.context;resolution:=optional,
+                            *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
     </build>
 
     <!-- Don't create distribution artifacts -->

Modified: portals/pluto/trunk/pluto-taglib/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-taglib/pom.xml?rev=886700&r1=886699&r2=886700&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-taglib/pom.xml (original)
+++ portals/pluto/trunk/pluto-taglib/pom.xml Thu Dec  3 08:10:31 2009
@@ -27,6 +27,7 @@
     </parent>
 
     <artifactId>pluto-taglib</artifactId>
+    <packaging>bundle</packaging>
     <name>Apache Pluto Portlet Tag Library</name>
     <description>Apache Pluto's Java Portlet Specification Tag Library implementation</description>
 

Modified: portals/pluto/trunk/pluto-util/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pluto-util/pom.xml?rev=886700&r1=886699&r2=886700&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-util/pom.xml (original)
+++ portals/pluto/trunk/pluto-util/pom.xml Thu Dec  3 08:10:31 2009
@@ -24,7 +24,9 @@
         <groupId>org.apache.portals.pluto</groupId>
         <version>2.0.1-SNAPSHOT</version>
     </parent>
+    
     <artifactId>pluto-util</artifactId>
+    <packaging>bundle</packaging>
     <name>Apache Pluto Utilities</name>
 
     <!-- The dependencies for the ApplicationServerHook project

Modified: portals/pluto/trunk/pom.xml
URL: http://svn.apache.org/viewvc/portals/pluto/trunk/pom.xml?rev=886700&r1=886699&r2=886700&view=diff
==============================================================================
--- portals/pluto/trunk/pom.xml (original)
+++ portals/pluto/trunk/pom.xml Thu Dec  3 08:10:31 2009
@@ -485,13 +485,26 @@
                         <target>1.5</target>
                     </configuration>
                 </plugin>
+                <plugin>
+                  <groupId>org.apache.felix</groupId>
+                  <artifactId>maven-bundle-plugin</artifactId>
+                  <version>2.0.1</version>
+                  <extensions>true</extensions>
+                  <configuration>
+                    <instructions>
+                      <Implementation-Title>${project.name}</Implementation-Title>
+                      <Implementation-Version>${project.version}</Implementation-Version>
+                      <Bundle-DocURL>${project.url}</Bundle-DocURL>
+                    </instructions>
+                  </configuration>
+                </plugin>
             </plugins>
         </pluginManagement>
         
         <plugins>
             <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
+              <groupId>org.apache.felix</groupId>
+              <artifactId>maven-bundle-plugin</artifactId>
             </plugin>
         </plugins>
     </build>