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.

Friday, November 29, 2013

How to install Apache Maven in Ubuntu 13.04

In this post I'm going to explain n how to setup apache maven on your ubuntu box. 

First Download the apache-maven-3.0.5-bin.tar.gz from the http://maven.apache.org/download.cgi website.

Then go to the downloaded folder and extract the downloaded bundle using the following command.

tar -zxf apache-maven-3.0.5-bin.tar.gz

Then copy that folder where ever you want in your computer. In this example I copy it to my home folder.

sudo cp -R apache-maven-3.0.5 /home/aruna

Then the final step is to create the symbolic link to the maven executable. Use the following command to create the symbolic link.
sudo ln -s /home/aruna//apache-maven-3.0.5/bin/mvn /usr/bin/mvn  

Now you are almost done and execute the following command to check the installation.
mvn –version  

Then you'll probably get the following output.

Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 19:21:28+0530)
Maven home: /home/aruna/apache-maven-3.0.5
Java version: 1.6.0_45, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.11.0-12-generic", arch: "amd64", family: "unix"
That's it and see you in another post.  :)