WSO2 carbon building process

WSO2 carbon [1] server which serves as the base for all the WSO2 products is built based on OSGi technology [2]. This blog post aims to briefly explain the code spaces that involves when building carbon server from source.

Steps to be followed to build WSO2 carbon 4.2.0 code base is explained in "Building from source" page [3]. After building kernel code space you can find the working carbon server pack at the <local-kernel-directory>/distribution/product/modules/distribution/target directory. User do not have to build platform code space to get the base carbon server, platform space needs to be built only if user needs another specific product like WSO2 ESB.

When user issues maven command with necessary build phases (Ex - mvn clean install) in their terminal from location <local-kernel-directory>, maven build process starts building checked out code in the following order.

  1. dependencies
  2. parent
  3. service-stubs
  4. core
  5. features
  6. samples
  7. distribution
These code spaces can be found directly inside the <local-kernel-directory>.

dependencies 


This code space contains 3rd party library code that are necessary for carbon server to operate. Code for these 3rd party libraries are maintained by WSO2 to make sure they meet carbon server's requirements. Therefore these 3rd party libraries have two part version numbers like X.Y.Z-wso2vN. In my previous post "Structure of WSO2 code repository"[4] I have explained what these version numbers mean.

parent 


Parent space contains a pom.xml file containing a set of properties defined to track versions of shared dependencies to be used. This pom file provide a single location to store and maintain all the dependency versions to be used in buidling the server. 

service-stubs 


Carbon server provides a set of web services that are defined by a set of wsdl files and can be called via external or internal soap client. Service-stub space provides a set of java stub implementations of these services so that a developer can easily call these web services calling these stubs.

core 


Core code space contains implementations done by WSO2 for the carbon server. Among these implementations there are OSGi bundles managing server space, features to manage user accounts, registry implementation to hold any resources user might need to add and UI bundles to support these implementations.

features 


WSO2 has developed a operational unit called feature which is a list of components and/or other features. "Introduction to feature management" [5] page of carbon documentation provides more detail about features. Features code space contains configurations used to build generic features necessary for carbon server operation.

samples 


This code space contains samples created to explain and demonstrate the functionality of WSO2 carbon server.

distribution


Build configurations in distribution directory created the final distributable WSO2 carbon server pack in the location <local-kernel-directory>/distribution/product/modules/distribution/target. This process takes all the above built artifacts such as 3rd party libraries, features and sample and combine them to create the final product.

References 


[1] http://wso2.com/products/carbon/
[2] http://www.osgi.org/Technology/WhatIsOSGi
[3] https://docs.wso2.com/display/Carbon420/Building+from+Source
[4]http://sameerak-blog.blogspot.com/2015/05/structure-of-wso2-code-repository.html
[5]https://docs.wso2.com/display/Carbon420/Introduction+to+Feature+Management




Popular posts from this blog

Running a Docker build agent on Azure Kubernetes Service (AKS)

Azure DevOps Docker DotNet Build Agent

Building Azure DevOps pipelines with a Docker agent