Pages

Subscribe:

Ads 468x60px

Sunday, December 1, 2013

How to Build WSO2 Carbon 4.2.0 Tutorial for a newbie

Hi all, in this post I am going to describe how to build WSO2 carbon from source. Now carbon is moving towards it's newest version carbon 5 (C5). 

prerequisites

1. Linux (Mine is Ubuntu 13.04)
2. Oracle Java 1.6 (1.7 is still not supported)
3. Apache Maven 3.0.5 (see post for installing apache maven)
4. Subversion

I assume that you have installed and configured all of the above and ready to build carbon. :)

Create a directory called carbon. Inside that folder create three directories called orbit, kernel and platform. If you need to build WSO2 carbon you first need to build orbit, kernel and the platform. You may be confused and wondering what is this orbit, kernel and platform is. Orbit is the third party external dependencies which needed for carbon. Kernel is the core part of the carbon which other wso2 products are run upon. Platform contains the other products of wso2.

carbon --- > orbit
            --- > kernel
            --- > platform

Ok first move into the orbit folder and checkout the source. To do so execute the following command.

svn checkout http://svn.wso2.org/repos/wso2/carbon/orbit/branches/4.2.0/

Then move into the kernel folder and checkout the source. To do so execute the following command.

svn checkout http://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.2.0/

And finally move into the platform folder and checkout the platform source.

svn checkout http://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/

Before building from source there are few settings to be applied. open the .bashrc file using the following command.

gedit /home/HOME_DIR/.bashrc

and append  the following lines.

MAVEN_OPTS=" -Xms512m -Xmx1024m -XX:MaxPermSize=1024m"
export MAVEN_OPTS

now build the following order; orbit -->  kernel and finally platform.
Move into the orbit folder and you'll see pom.xml file. Enter the following command to build the orbit.

mvn clean install -Dmaven.test.skip=true

Note that to complete the build you need to connect to the internet. Now that's it. There may be some build failures. Try updating the subversion and rebiuld.

In the next tutorial I'm going to explain how to debug the carbon kernel. See you until then.

2 comments: