You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by tr...@apache.org on 2007/10/19 06:01:26 UTC

svn commit: r586255 - in /mina/trunk: ./ core/ example/ filter-codec-http/ filter-codec-netty/ filter-compression/ integration-jmx/ integration-spring/ protocol-http-client/ protocol-http-server/ transport-apr/ transport-serial/

Author: trustin
Date: Thu Oct 18 21:01:25 2007
New Revision: 586255

URL: http://svn.apache.org/viewvc?rev=586255&view=rev
Log:
Re-enabled OSGi framework integration - should work fine now
* It seems like the file and directory mode of all files in the generated OSGi bundle is '000'.  I changed it to 644 and 755 respectively for interoperability with a certain archive software (i.e. file-roller).
* Each POM of submodules now defines 'exportedPackage' to generate the bundle that contains correct classes.
* mina-core also overrides symbolicBundleName solely for cosmetic reason.


Modified:
    mina/trunk/core/pom.xml
    mina/trunk/example/pom.xml
    mina/trunk/filter-codec-http/pom.xml
    mina/trunk/filter-codec-netty/pom.xml
    mina/trunk/filter-compression/pom.xml
    mina/trunk/integration-jmx/pom.xml
    mina/trunk/integration-spring/pom.xml
    mina/trunk/pom.xml
    mina/trunk/protocol-http-client/pom.xml
    mina/trunk/protocol-http-server/pom.xml
    mina/trunk/transport-apr/pom.xml
    mina/trunk/transport-serial/pom.xml

Modified: mina/trunk/core/pom.xml
URL: http://svn.apache.org/viewvc/mina/trunk/core/pom.xml?rev=586255&r1=586254&r2=586255&view=diff
==============================================================================
--- mina/trunk/core/pom.xml (original)
+++ mina/trunk/core/pom.xml Thu Oct 18 21:01:25 2007
@@ -8,8 +8,11 @@
   </parent>
   <artifactId>mina-core</artifactId>
   <name>Apache MINA Core</name>
-  <packaging>jar</packaging>
-
+  <packaging>bundle</packaging>
+  <properties>
+    <symbolicName>${groupId}.core</symbolicName>
+    <exportedPackage>${groupId}</exportedPackage>
+  </properties>
   <dependencies>
   </dependencies>
 </project>

Modified: mina/trunk/example/pom.xml
URL: http://svn.apache.org/viewvc/mina/trunk/example/pom.xml?rev=586255&r1=586254&r2=586255&view=diff
==============================================================================
--- mina/trunk/example/pom.xml (original)
+++ mina/trunk/example/pom.xml Thu Oct 18 21:01:25 2007
@@ -11,15 +11,15 @@
   <packaging>jar</packaging>  
   <dependencies>
     <dependency>
-      <groupId>org.apache.mina</groupId>
+      <groupId>${groupId}</groupId>
       <artifactId>mina-core</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.apache.mina</groupId>
+      <groupId>${groupId}</groupId>
       <artifactId>mina-integration-spring</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.apache.mina</groupId>
+      <groupId>${groupId}</groupId>
       <artifactId>mina-protocol-http-client</artifactId>
     </dependency>
     <dependency>

Modified: mina/trunk/filter-codec-http/pom.xml
URL: http://svn.apache.org/viewvc/mina/trunk/filter-codec-http/pom.xml?rev=586255&r1=586254&r2=586255&view=diff
==============================================================================
--- mina/trunk/filter-codec-http/pom.xml (original)
+++ mina/trunk/filter-codec-http/pom.xml Thu Oct 18 21:01:25 2007
@@ -8,10 +8,13 @@
   <modelVersion>4.0.0</modelVersion>
   <artifactId>mina-filter-codec-http</artifactId>
   <name>Apache MINA HTTP Codec</name>
-  <packaging>jar</packaging>
+  <packaging>bundle</packaging>
+  <properties>
+    <exportedPackage>${groupId}.filter.codec.http</exportedPackage>
+  </properties>
   <dependencies>
     <dependency>
-      <groupId>org.apache.mina</groupId>
+      <groupId>${groupId}</groupId>
       <artifactId>mina-core</artifactId>
     </dependency>
     <dependency>

Modified: mina/trunk/filter-codec-netty/pom.xml
URL: http://svn.apache.org/viewvc/mina/trunk/filter-codec-netty/pom.xml?rev=586255&r1=586254&r2=586255&view=diff
==============================================================================
--- mina/trunk/filter-codec-netty/pom.xml (original)
+++ mina/trunk/filter-codec-netty/pom.xml Thu Oct 18 21:01:25 2007
@@ -8,11 +8,13 @@
   </parent>
   <artifactId>mina-filter-codec-netty</artifactId>
   <name>Apache MINA Netty Codec</name>
-  <packaging>jar</packaging>  
-
+  <packaging>bundle</packaging>  
+  <properties>
+    <exportedPackage>${groupId}.filter.codec.netty</exportedPackage>
+  </properties>
   <dependencies>
     <dependency>
-      <groupId>org.apache.mina</groupId>
+      <groupId>${groupId}</groupId>
       <artifactId>mina-core</artifactId>
     </dependency>
     <dependency>

Modified: mina/trunk/filter-compression/pom.xml
URL: http://svn.apache.org/viewvc/mina/trunk/filter-compression/pom.xml?rev=586255&r1=586254&r2=586255&view=diff
==============================================================================
--- mina/trunk/filter-compression/pom.xml (original)
+++ mina/trunk/filter-compression/pom.xml Thu Oct 18 21:01:25 2007
@@ -8,11 +8,13 @@
   </parent>
   <artifactId>mina-filter-compression</artifactId>
   <name>Apache MINA Compression Filter</name>
-  <packaging>jar</packaging>  
-
+  <packaging>bundle</packaging>  
+  <properties>
+    <exportedPackage>${groupId}.filter.compression</exportedPackage>
+  </properties>
   <dependencies>
     <dependency>
-      <groupId>org.apache.mina</groupId>
+      <groupId>${groupId}</groupId>
       <artifactId>mina-core</artifactId>
     </dependency>
 

Modified: mina/trunk/integration-jmx/pom.xml
URL: http://svn.apache.org/viewvc/mina/trunk/integration-jmx/pom.xml?rev=586255&r1=586254&r2=586255&view=diff
==============================================================================
--- mina/trunk/integration-jmx/pom.xml (original)
+++ mina/trunk/integration-jmx/pom.xml Thu Oct 18 21:01:25 2007
@@ -8,10 +8,13 @@
   </parent>
   <artifactId>mina-integration-jmx</artifactId>
   <name>Apache MINA JMX Integration</name>
-  <packaging>jar</packaging>  
+  <packaging>bundle</packaging>  
+  <properties>
+    <exportedPackage>${groupId}.integration.jmx</exportedPackage>
+  </properties>
   <dependencies>
     <dependency>
-      <groupId>org.apache.mina</groupId>
+      <groupId>${groupId}</groupId>
       <artifactId>mina-core</artifactId>
     </dependency>
   </dependencies>

Modified: mina/trunk/integration-spring/pom.xml
URL: http://svn.apache.org/viewvc/mina/trunk/integration-spring/pom.xml?rev=586255&r1=586254&r2=586255&view=diff
==============================================================================
--- mina/trunk/integration-spring/pom.xml (original)
+++ mina/trunk/integration-spring/pom.xml Thu Oct 18 21:01:25 2007
@@ -8,10 +8,13 @@
   </parent>
   <artifactId>mina-integration-spring</artifactId>
   <name>Apache MINA Spring Integration</name>
-  <packaging>jar</packaging>  
+  <packaging>bundle</packaging>  
+  <properties>
+    <exportedPackage>${groupId}.integration.spring</exportedPackage>
+  </properties>
   <dependencies>
     <dependency>
-      <groupId>org.apache.mina</groupId>
+      <groupId>${groupId}</groupId>
       <artifactId>mina-core</artifactId>
     </dependency>
     <dependency>

Modified: mina/trunk/pom.xml
URL: http://svn.apache.org/viewvc/mina/trunk/pom.xml?rev=586255&r1=586254&r2=586255&view=diff
==============================================================================
--- mina/trunk/pom.xml (original)
+++ mina/trunk/pom.xml Thu Oct 18 21:01:25 2007
@@ -46,13 +46,7 @@
     </notifiers>
   </ciManagement>
 
-  <description>
-    MINA (Multipurpose Infrastructure for Network Applications) is a
-    network application framework which helps users develop high
-    performance and highly scalable network applications easily.
-    It provides an abstract &middot; event-driven &middot; asynchronous
-    API over various transports such as TCP/IP and UDP/IP via Java NIO.
-  </description>
+  <description>Apache MINA is a network application framework which helps users develop high performance and highly scalable network applications easily.  It provides an abstract &middot; event-driven &middot; asynchronous API over various transports such as TCP/IP and UDP/IP via Java NIO.</description>
 
   <licenses>
     <license>
@@ -62,6 +56,10 @@
     </license>
   </licenses>
 
+  <properties>
+    <symbolicName>${exportedPackage}</symbolicName>
+  </properties>
+
   <dependencyManagement>
     <dependencies>
       <!-- Submodules -->
@@ -254,7 +252,9 @@
     <module>filter-codec-netty</module>
     <module>filter-codec-http</module>
     <module>protocol-http-client</module>
+    <!--
     <module>protocol-http-server</module>
+    -->
     <module>integration-jmx</module>
     <module>integration-spring</module>
     <module>example</module>
@@ -314,7 +314,6 @@
           </tagBase>
         </configuration>
       </plugin>
-      <!--
       <plugin>
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
@@ -323,11 +322,11 @@
         <extensions>true</extensions>
         <configuration>
           <instructions>
-            <Export-Package>org.apache.mina.*</Export-Package>
+            <Bundle-SymbolicName>${symbolicName}</Bundle-SymbolicName>
+            <Export-Package>${exportedPackage}.*</Export-Package>
           </instructions>
         </configuration>
       </plugin>
-      -->
       <plugin>
         <artifactId>maven-antrun-plugin</artifactId>
         <executions>
@@ -338,20 +337,26 @@
               <tasks>
                 <taskdef resource="net/sf/antcontrib/antlib.xml"/>
                 <if>
-                  <equals arg1="${project.packaging}" arg2="jar"/>
+                  <or>
+                    <equals arg1="${project.packaging}" arg2="jar"/>
+                    <equals arg1="${project.packaging}" arg2="bundle"/>
+                  </or>
                   <then>
-                    <jar destfile="${project.build.directory}/${project.build.finalName}.jar" update="yes">
+                    <move file="${project.build.directory}/${project.build.finalName}.jar" tofile="${project.build.directory}/${project.build.finalName}.orig.jar"/>
+                    <zip destfile="${project.build.directory}/${project.build.finalName}.jar">
                       <zipfileset dir="${basedir}/.." prefix="META-INF/">
                         <include name="LICENSE.*"/>
                         <include name="NOTICE.*"/>
                       </zipfileset>
-                    </jar>
-                    <jar destfile="${project.build.directory}/${project.build.finalName}-sources.jar" update="yes">
+                      <zipfileset src="${project.build.directory}/${project.build.finalName}.orig.jar" filemode="644" dirmode="755"/>
+                    </zip>
+                    <jar destfile="${project.build.directory}/${project.build.finalName}-sources.jar" update="true">
                       <zipfileset dir="${basedir}/.." prefix="META-INF/">
                         <include name="LICENSE.*"/>
                         <include name="NOTICE.*"/>
                       </zipfileset>
                     </jar>
+                    <delete file="${project.build.directory}/${project.build.finalName}.orig.jar"/>
                   </then>
                 </if>
               </tasks>

Modified: mina/trunk/protocol-http-client/pom.xml
URL: http://svn.apache.org/viewvc/mina/trunk/protocol-http-client/pom.xml?rev=586255&r1=586254&r2=586255&view=diff
==============================================================================
--- mina/trunk/protocol-http-client/pom.xml (original)
+++ mina/trunk/protocol-http-client/pom.xml Thu Oct 18 21:01:25 2007
@@ -25,14 +25,17 @@
   <modelVersion>4.0.0</modelVersion>
   <artifactId>mina-protocol-http-client</artifactId>
   <name>Apache MINA HTTP Client</name>
-  <packaging>jar</packaging>  
+  <packaging>bundle</packaging>  
+  <properties>
+    <exportedPackage>${groupId}.protocol.http.client</exportedPackage>
+  </properties>
   <dependencies>
     <dependency>
-      <groupId>org.apache.mina</groupId>
+      <groupId>${groupId}</groupId>
       <artifactId>mina-core</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.apache.mina</groupId>
+      <groupId>${groupId}</groupId>
       <artifactId>mina-filter-codec-http</artifactId>
     </dependency>
     <dependency>

Modified: mina/trunk/protocol-http-server/pom.xml
URL: http://svn.apache.org/viewvc/mina/trunk/protocol-http-server/pom.xml?rev=586255&r1=586254&r2=586255&view=diff
==============================================================================
--- mina/trunk/protocol-http-server/pom.xml (original)
+++ mina/trunk/protocol-http-server/pom.xml Thu Oct 18 21:01:25 2007
@@ -8,7 +8,10 @@
   <modelVersion>4.0.0</modelVersion>
   <artifactId>mina-protocol-http-server</artifactId>
   <name>Apache MINA HTTP Server</name>
-  <packaging>jar</packaging>  
+  <packaging>bundle</packaging>  
+  <properties>
+    <exportedPackage>${groupId}.protocol.http.server</exportedPackage>
+  </properties>
   <dependencies>
   </dependencies>
 </project>

Modified: mina/trunk/transport-apr/pom.xml
URL: http://svn.apache.org/viewvc/mina/trunk/transport-apr/pom.xml?rev=586255&r1=586254&r2=586255&view=diff
==============================================================================
--- mina/trunk/transport-apr/pom.xml (original)
+++ mina/trunk/transport-apr/pom.xml Thu Oct 18 21:01:25 2007
@@ -8,10 +8,13 @@
   </parent>
   <artifactId>mina-transport-apr</artifactId>
   <name>Apache MINA APR Communication Support</name>
-  <packaging>jar</packaging>
+  <packaging>bundle</packaging>  
+  <properties>
+    <exportedPackage>${groupId}.transport.socket.apr</exportedPackage>
+  </properties>
   <dependencies>
     <dependency>
-      <groupId>org.apache.mina</groupId>
+      <groupId>${groupId}</groupId>
       <artifactId>mina-core</artifactId>
     </dependency>
     <dependency>

Modified: mina/trunk/transport-serial/pom.xml
URL: http://svn.apache.org/viewvc/mina/trunk/transport-serial/pom.xml?rev=586255&r1=586254&r2=586255&view=diff
==============================================================================
--- mina/trunk/transport-serial/pom.xml (original)
+++ mina/trunk/transport-serial/pom.xml Thu Oct 18 21:01:25 2007
@@ -8,10 +8,13 @@
   </parent>
   <artifactId>mina-transport-serial</artifactId>
   <name>Apache MINA Serial Communication support</name>
-  <packaging>jar</packaging>  
+  <packaging>bundle</packaging>  
+  <properties>
+    <exportedPackage>${groupId}.transport.serial</exportedPackage>
+  </properties>
   <dependencies>
     <dependency>
-      <groupId>org.apache.mina</groupId>
+      <groupId>${groupId}</groupId>
       <artifactId>mina-core</artifactId>
     </dependency>
     <dependency>