Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

OSGi headers

Nicolas
2012-02-09
2013-05-02
  • Nicolas
    Nicolas
    2012-02-09

    The UPnP stack jar is not package as an OSGi bundle.
    This can be done easily by adding in the pom:

        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.1.0</version>
                    <extensions>true</extensions>
                </plugin>
            </plugins>
        </build>
    

    and changing packaging from jar to bundle.

     
  • Nicolas
    Nicolas
    2012-02-10

    As some dependencies are optionnals at runtime,
    The bundle should be configured like

        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.1.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <instructions>
                                <Import-Package>
    org.apache.xerces.parsers;resolution:=optional,
    org.kxml2.io;resolution:=optional,
    org.xmlpull.v1;resolution:=optional,
    *
                                    </Import-Package>
                            </instructions>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    
     
  • Satoshi Konno
    Satoshi Konno
    2012-02-14

    Hi,

    I would like to add your changes into the trunk repository.
    Could you send your changes by diff format ?

    Thanks for your report :-)

    Best Regards,

    Satoshi Konno

     
  • Nicolas
    Nicolas
    2012-02-15

    The content of the patch file is:

    Index: upnp-stack/pom.xml
    ===================================================================
    --- upnp-stack/pom.xml  (revision 177)
    +++ upnp-stack/pom.xml  (working copy)
    @@ -10,7 +10,7 @@
       <modelVersion>4.0.0</modelVersion>
       <groupId>org.cybergarage.cyberlink</groupId>
       <artifactId>upnp-stack</artifactId>
    -  <packaging>jar</packaging>
    +  <packaging>bundle</packaging>
       <version>2.1.0-SNAPSHOT</version>
       <name>CyberLink UPnP Stack</name>
       <description>A pure Java Open Source implementation of the UPnP stack</description>
    @@ -28,6 +28,27 @@
        <developerConnection>scm:svn:https://cgupnpjava.svn.sourceforge.net/svnroot/cgupnpjava/trunk/upnp-stack</developerConnection>
        <url>http://cgupnpjava.svn.sourceforge.net/viewvc/cgupnpjava/trunk/upnp-stack</url>
       </scm>
    +   
    +   <build>
    +       <plugins>
    +           <plugin>
    +               <groupId>org.apache.felix</groupId>
    +               <artifactId>maven-bundle-plugin</artifactId>
    +               <version>2.1.0</version>
    +               <extensions>true</extensions>
    +               <configuration>
    +                   <instructions>
    +                           <Import-Package>
    +org.apache.xerces.parsers;resolution:=optional,
    +org.kxml2.io;resolution:=optional,
    +org.xmlpull.v1;resolution:=optional,
    +*
    +                               </Import-Package>
    +                       </instructions>
    +               </configuration>
    +           </plugin>
    +       </plugins>
    +   </build>
       
       <developers />
    
     
  • Satoshi Konno
    Satoshi Konno
    2012-04-04

    Hi,

    Thanks for your report :-)

    I will watch your forked branch and import your changed into
    my repository every now and then.

    Best Regards,

    Satoshi Konno