2010/10/01
1 Oct, 2010

Build WSO2 ESB from source

  • Heshan Suriyaarachchi
  • Software Engineer - WSO2

1) Checkout WSO2 Carbon project's trunk.

1.heshan@heshan-laptop:~/Dev/trunk/$ svn co https://svn.wso2.org/repos/wso2/trunk/carbon

Following directories/files would be checked-out to your file system. 

1.carbon
2.|-- components
3.|-- core
4.|-- dependencies
5.|-- features
6.|-- orbit
7.|-- pom.xml
8.|-- products

2) Build the dependencies for ESB project.

1.heshan@heshan-laptop:~/Dev/trunk/carbon/dependencies$ mvn clean install -Dproduct=esb

Then the following dependencies will be built. If you encounter any build errors, try and build each project one at a time :)

01.dependencies
02.|-- abdera
03.|-- axiom
04.|-- axis2
05.|-- wss4j
06.|-- carbon-p2-plugin
07.|-- commons/caching
08.|-- commons/eventing
09.|-- commons/throttle
10.|-- commons/xkms
11.|-- p2
12.|-- rampart
13.|-- rhino
14.|-- sandesha
15.|-- savan
16.|-- synapse
17.|-- transports
18.|-- commons-vfs
Carbon Dependencies :-

Carbon platform makes use of already existing open source projects rather than trying to re-invent the wheel. We use popular and matured open source projects like apache axiom, axis2, synapse etc which fuel the very heart of the carbon platform. Dependencies contains all these open source projects that the carbon platform makes use of adding more value to them.

3) Build Carbon Orbit for ESB project.

1.heshan@heshan-laptop:~/Dev/trunk/carbon/orbit$ mvn clean install -Dproduct=esb

Carbon Orbit :-
WSO2 Carbon uses OSGi as its underlying modularization technology. But Many 3rd party open source libraries does not exists in osgi form (ie. in osgi bundle form). Therefore to introduce them to the carbon platform, we wrap-around them to make them proper OSGI bundles (They will be useful to any OSGI environment like felix, knoplerfish etc). Carbon-orbit project contains all these third party bundles.

4) Build Carbon Core for ESB project.

1.heshan@heshan-laptop:~/Dev/trunk/carbon/core$ mvn clean install -Dproduct=esb

Carbon Core :-
This is where we create the base for our platform. Everything runs on top of this base. From the simple OSGi framework to the UI framework, all the critical technologies for the platform are implemented here.

5) Build Carbon Components for ESB project.

1.heshan@heshan-laptop:~/Dev/trunk/carbon/components$ mvn clean install -Dproduct=esb

Carbon Components :-
Components module contains the main functionalities that are introduced by each and every product in addition to to the core level features. Among the close to 100 components each adds value to the product in a different way than the next. Some will enhance the security while some may just provide vital tools to monitor the health of the system.

6) Build Carbon Features for ESB project.

1.heshan@heshan-laptop:~/Dev/trunk/carbon/features$ mvn clean install -Dproduct=esb

Carbon Features :-
Equinox P2 has been integrated with WSO2 Carbon platform to enable provisioning capabilities. This enables you to extend or enhance your carbon platform with more functionalities or just strip out the irrelevant features which suits your context.

7) Build WSO2 ESB product

1.heshan@heshan-laptop:~/Dev/trunk/carbon/products/esb$ mvn clean install

Carbon Product :-
Products module contains all the products ranging from ESB to BRS.

8) When the build is successful move to target folder inside esb project.

1.heshan@heshan-laptop:~/Dev/trunk/carbon/products/esb/modules/distribution/target$ ls
2.pom-transformed.xml  wso2esb-3.0.0-SNAPSHOT  wso2esb-3.0.0-SNAPSHOT-docs.zip  wso2esb-3.0.0-SNAPSHOT.zip

Then unzip the SNAPSHOT.

1.heshan@heshan-laptop:~/Dev/trunk/carbon/products/esb/modules/distribution/target$ unzip wso2esb-3.0.0-SNAPSHOT.zip

Start the ESB server

1.heshan@heshan-laptop:~/Dev/trunk/carbon/products/esb/modules/distribution/target/wso2esb-3.0.0-SNAPSHOT/bin$ ./wso2server.sh

Now you have successfully built and started a WSO2 ESB build from Carbon trunk.

References

[1] -

https://wso2.com/products/enterprise-service-bus/

[2] -

https://wso2.com/products/carbon/

NOTE

: If you need to build any other Carbon based product, repeat the above steps by replacing the product name to the relevant product. 

mvn version used for testing this was: 

1.heshan@heshan-laptop:~$ mvn -version
2.Apache Maven 2.1.0 (r755702; 2009-03-19 00:40:27+0530)
3.Java version: 1.6.0_03
4.Java home: /home/heshan/Installations/jdk1.6.0_03/jre
5.Default locale: en_US, platform encoding: UTF-8
6.OS name: "linux" arch: "i386" Family: "unix"

Author: Heyshan Suriaarachchi, Software Engineer, WSO2 Inc

Read the blog post: Build WSO2 ESB from source

 

About Author

  • Heshan Suriyaarachchi
  • Software Engineer
  • WSO2 Inc.