• Guide Tutorials Examples Services App notes Links FAQ Forum
  • Guide
    Tutorials
    Example Projects
    Documentation
    Service Catalog
    OSGi Specifications
    App Notes
    Where to Find Stuff
    Videos
    Known Issues
    Frequently Asked Questions
  • Prev Next

    This website and its associated repositories, are deprecated and no longer supported by the OSGi Alliance. Please visit https://enroute.osgi.org for the latest supported version of OSGi enRoute.

    This enRoute v2 archive site is kept for those who do not intend to use the latest version of OSGi enRoute. If you are new to OSGi enRoute, then please start with the latest OSGi enRoute.

    Conclusion

    You can look at the osgi.enroute.examples.wrapping.dom4j.adapter project for the final result. As a summary, this is the resulting bnd file:

    #
    # OSGI ENROUTE EXAMPLES WRAPPING DOM4J ADAPTER BUNDLE 
    #
    
    version-dom4j = 1.6.1
    version-relaxng = 1.0.0
    version-gjt = 2.1.10
    
    Bundle-Version:			1.6.1.${tstamp}
    Bundle-Description:		Wraps DOM4J for OSGi, including the primary dependencies
    Bundle-Copyright:		OSGi enRoute
    Bundle-Vendor:			OSGi Alliance
    
    
    Export-Package: \
    			org.dom4j.*;version=${version-dom4j}, \
    			org.relaxng.datatype;version=${version-relaxng}, \
    			org.gjt.xpp;version=${version-gjt}
    
    Private-Package: \
    	org.gjt.xpp.*
    
    Provide-Capability: \
    	  osgi.contract; \
    	    osgi.contract=DOM4J; \
    	    uses:="${exports}"; \
    	    version:List<Version>="1.0"
    
    Import-Package: \
    	  com.sun.msv.datatype.*; resolution:=optional, \
    	  !org.xmlpull.*, \
    	  *
    
    	
    -includeresource: \
    		@pull-parser__pull-parser-2.1.10.jar!/PullParser*_VERSION, \
    		tosc-license.txt, \
    		{readme.md}
    
    -conditionalpackage: \
    	  !javax.*, \
    	  !org.xml.*, \
    	  !org.w3c.*, \
    	  !org.ietf.jgss, \
    	  !org.omg.*, \
    	  !com.sun.*, \
    	  !org.jaxen.*, \
    	  !org.xmlpull.*, '\
    	  *
    	
    -buildpath: \
    	org.jvnet.hudson.dom4j__dom4j;version=1.6.1.hudson-3,\
    	xmlpull__xmlpull;version=1.1.3.4d_b4_min,\
    	pull-parser__pull-parser;version=2.1.10,\
    	jaxen;version=1.1.6, \
    	net.java.dev.msv.core;version=2013.6.1,\
    	net.java.dev.msv.xsdlib;version=2013.6.1,\
    	relaxngDatatype__relaxngDatatype;version=20020414.0
    	
    -testpath: \
    	osgi.enroute.junit.wrapper;version=4.12
    

    With OSGi enRoute, you automatically get the Gradle build. However, notice that this file can easily be used in a Maven build with a few adaptations.


    Prev Next
    • Copyright © 2021 OSGi™ Alliance.