Understanding the packages and how to build them ------------------------------------------------ Note: at the time of writing these packages are named 'com.ibm.*'. This naming needs to be changed and this file should be updated at the same time. Quickstart ---------- Ensure you are using a Java 6 JDK. To build the code without running the unit tests: cd build ant -DbuildLabel=SNAPSHOT -f build-aries.xml To subsequently run the unit tests and findbugs, do: cd ../unittest.framework ant cd ../build ant -DbuildLabel=SNAPSHOT -f build-aries.xml build-aries-full Build system ------------ 1) aries.image 2) build 3) prereqs These three projects comprise the build system used to compile, test & package the other components included. The prereqs project is responsible for obtaining the prereq libraries required for the build. It checks if a download is required, and if so obtains the appropriate archive, unpacks it, transforms it if required. The build project provides a number of custom ant tasks, and a top level 'build-aries.xml'. The build uses the custom ant tasks to enable ant to build using the metadata managed by eclipse for each project. In addition, they coordinate the execution of the unit-tests, and the execution of findbugs. If developing using eclipse, set a java6 jdk, import all the projects, run the prereqs/build.xml as an ant task, set the Plug-in Development Target Platform to be the prereqs/osgi/lib directory (should show 3 plugins), after which all projects should be showing without errors, (if not sometimes an eclipse clean/rebuild is required). Then build/build-aries.xml can be run as an ant task, or run with the modified target build-aries-full to perform unit tests and findbugs. Unittest & findbug reports can be found per project within {project}/build/reports. For a successful build, output is stored within aries.image/output Unit test --------- 1) unittest.framework A collection of related unit test code, to allow construction of various Mock objects during unit testing. RFC142 implementation --------------------- 1) com.ibm.osgi.jndi This bundle provides the integration layer between JNDI and the service registry. At runtime it installs an InitialContextFactoryBuilder and an ObjectFactoryBuilder that, through appropriate proxying, will trap all requests for InitialContext, URLContext and ObjectFactory objects. This allows other bundles to publish InitialContextFactory, InitialContextFactoryBuilder, ObjectFactory and ObjectFactory in the service registry for them to be used to serve JNDI requests. 2) com.ibm.osgi.jndi.url This bundle implements the osgi:services/ (or equivalently aries:services/) namespace handler through an ObjectFactory that is published into the service registry (to be picked up from there by the first bundle). This namespace provides the reverse integration allowing JNDI clients to access services published in the OSGi service registry through a JNDI lookup. RFC143 related components ------------------------- 1) com.ibm.osgi.jpa.unit.manager This project contains an incomplete implementation of RFC143. The code contained in the packages of this project form together to create a bundle that manages persistence providers and persistence bundles (bundles which contain persistence.xml files). The persistence provider manager is responsible for registering persistence provider implementations into the osgi service registry. The persistence bundle manager is responsible for associating the persistence bundle with a persistence provider and for registering services representing the persistence units contained within the persistence.xml files. The services registered could then be used to create a simple JPA container. 2) com.ibm.osgi.utils This package contains a FragmentBuilder utility class that can be used for creating fragments to attach to bundles Application manifest processing Application manifest processing ------------------------------- 1) com.ibm.ws.eba.app.utils A small API for accessing Application.mf files, which are intended to represent meta information about applications that may consist of multiple versioned bundles. The meta information includes the Applications Symbolic Name, Version, Name, Application Content, Service Imports/Exports, and application scope. API provides typed objects representing the various components of an application.mf, with a parser that can read from a supplied Manifest. RFC66 related components ------------------------ 1) com.ibm.osgi.web This component contains the source code related to the conversion of WAR files to WAB files. It provides a URLSchemeHandler that implements the URL scheme detailed in the RFC66 specification, allowing the conversion of a war file via the url stream to the war location. It also provides various helper methods to aid in manifest re-writing and general war to wab conversion. The specification for this code is described in section 5.2 of the RFC66 specification.