Hey, Thanks a lot for this :>
Quintin Beukes On Thu, Oct 22, 2009 at 9:13 AM, Forrest Xia <[email protected]> wrote: > I saw some changes happened in geronimo framework code tree, those are the > attempts to transform geronimo framework modules to OSGi bundles. > > I am eager to know how it works, so I made some effort to pull the code and > try to make a build by self. Although the build process is not so smoothly, > I finally make it work. That's excited, isn't it? Here are the steps for > those who want to work on or study the Geronimo OSGi transformation :-) > > 1. install and config build softwares > 1.1 maven 2.0.10 > 1.2 subversion > 1.3 sun jdk 1.5 or 1.6 > > 2. checkout and build servicemix4 bundles. > ServiceMix4 bundles are required by the new geronimo framework. The build > process is problematic and tricky, be patient :-) > $ svn co http://svn.apache.org/repos/asf/servicemix/smx4/all/ smx4all > $ cd smx4all > $ mvn install -e > if you encounter error like "missing bundles-pom", do as follows: > $ cd bundles/bundles-pom > $ mvn install -e > After successfully built bundles-pom, you can start to build bundles > $ cd .. > $ mvn install -e > If you hit problem that says missing certain specific version of > bundles-pom, you need to manually update that bundle's pom.xml. In my case, > the groovy-1.5.6 has old bundles-pom dependency, so change it to the new one > "5-SNAPSHOT", then from the root of bundles, build again. > $ mvn install -e > You need to make sure all bundles are successfully built and installed into > your local maven repository. > > Besides, you need to build these bundles additionally: > org.apache.servicemix.bundles.jaxb-impl/2.1.6_2-SNAPSHOT > org.apache.servicemix.bundles.woodstox/3.2.8_1-SNAPSHOT > org.apache.servicemix.bundles.jline/0.9.94_2-SNAPSHOT > > 3. Check out and build felix bundles. > Not all of felix bundles need to be built. For my experience, these bundles > are required: > org.osgi.core > org.osgi.foundation > org.osgi.compendium > > > 4. check out and build geronimo framework > check out geronimo code from trunk > $ svn co http://svn.apache.org/repos/asf/geronimo/server/trunk/ gtrunk > build from framework > $ cd gtrunk/framework > $ mvn install -e > You will hit bundle missing problems. Go to bundles sub directory and > manually build each bundle, until all bundles are built successfully. > $ cd bundles/asm-3.1 > $ mvn install -e > $ cd ../asm-commons-3.1 > $ mvn install -e > ... > The order is: > asm-3.1 asm-commons-3.1 commons-cli log4j plexus-utils plexus-logging > plexus-archiver sxc-jaxb sxc-runtime > You might encounter dependency missing errors when building plexus-logging, > plexus-archiver sxc-jaxb sxc-runtime, resolve them like this: > For plexus-logging and plexus-archiver, update plexus-utils' version in > pom.xml to the one you just built > For sxc-jaxb, you need to build "org.apache.servicemix.bundles.jaxb-impl", > back to servicemix4 source tree and find it to build > > Back to framework directory, and build again: > $ mvn install -e > > You might to need to download some bundles manually. For my experience, > these bundles are manually downloaded and installed: > wget > http://repository.code-house.org/content/repositories/release/org/osgi/org.osgi.impl.bundle.jmx/4.2.0.200907080519/org.osgi.impl.bundle.jmx-4.2.0.200907080519.jar > mvn install:install-file -DgroupId=org.osgi > -DartifactId=org.osgi.impl.bundle.jmx -Dversion=4.2.0.200907080519 > -Dpackaging=jar -Dfile=org.osgi.impl.bundle.jmx-4.2.0.200907080519.jar > > 5. After you see success prompt, you can try to run osgi-ed geronimo > framework like this: > $ cd <gtrunk>/framework/assemblies/geronimo-framework/target/assembly/bin > $ chmod +x * > $ ./karaf > Auto-properties start: org.osgi.framework.BundleException: Fragment bundles > can not be started. > log4j:WARN No appenders could be found for logger > (org.ops4j.pax.url.commons.handler.HandlerActivator). > log4j:WARN Please initialize the log4j system properly. > __ __ ____ > / //_/____ __________ _/ __/ > / ,< / __ `/ ___/ __ `/ /_ > / /| |/ /_/ / / / /_/ / __/ > /_/ |_|\__,_/_/ \__,_/_/ > > Apache Felix Karaf (1.1.0-SNAPSHOT) > > Hit '<tab>' for a list of available commands > and '[cmd] --help' for help on a specific command. > Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Karaf. > > ka...@root> Module 1/5 > org.apache.geronimo.framework/j2ee-system/3.0-SNAPSHOT/car > started in .000s > Module 2/5 > org.apache.geronimo.framework/rmi-naming/3.0-SNAPSHOT/car > started in .097s > Module 3/5 > org.apache.geronimo.framework/plugin/3.0-SNAPSHOT/car > started in .085s > Module 4/5 > org.apache.geronimo.framework/j2ee-security/3.0-SNAPSHOT/car > started in .272s > Module 5/5 > org.apache.geronimo.framework/server-security-config/3.0-SNAPSHOT/car > started in .021s > Startup completed in 4.069s seconds > Listening on Ports: > 1099 0.0.0.0 RMI Naming > 9999 0.0.0.0 JMX Remoting Connector > > Geronimo Application Server started > > ka...@root> > > > OK! now you can try to install some application bundles with OSGi commands. > For how to use this console, see > http://felix.apache.org/site/karaf-users-guide.html > > >
