The source code of all WSO2 products , such as Application Server are shipped as binary packs, which contains a wide variety of features to support your enterprise requirements. You can easily download the binary distribution, and get started with the product immediately. However, as developers, you can download the source code and build the product as shown below.The following topics describe this processas well as the scripts that are used for building WSO2 products are maintained in GitHub repositories. If you are a developer, you can easily clone the source code from these Git repositories, and if required, you can do modifications and build a customized product on your own.
See the following topics for instructions on how to work with WSO2 Git repositories:
The source code of all WSO2 products are maintained in GitHub as a list of repositories. Each of the WSO2 products are built using the source code stored in several of these repositories. Given below is the Git repository for
|Table of Contents|
Identifying WSO2 Git Repositories
In GitHub, the WSO2 source code is organized into separate repositories and each WSO2 product is built using several of these repositories. Therefore, if you are interested in editing the source code and building a customized product, you need to first identify the Git repositories that you require.
For the complete list of repositories used by WSO2 products, see this link.
The Git repositories used by WSO2 products are of two categories:
Component-level repositories: A component repository consists of the source code relevant to a particular component. Each WSO2 product release is built using combinations of these component repositories. Therefore, if you want to do modifications to a particular function in a product, you need to clone the Git repositories relevant to that function.
For example, listed below are the main component Git repositories (but not all) that are used for WSO2 AS 5.3.0 release
. The Tag ID indicates the tag from the repository that was used for the particular product release. If you want to know more about other component repositories and the tags used for a product release, send an email to email@example.com.
Git Repository Name Repository URL Tag for AS 5.3.0 Release
carbon4-kernel.git v4.4.1 carbon-commons https://github.com/wso2/carbon-commons.git v4.4.7 carbon-identity https://github.com/wso2/carbon-identity.git v4.5.5 carbon-registry https://github.com/wso2/carbon-registry.git v4.4.8 carbon-multitenancy https://github.com/wso2/carbon-multitenancy.git v4.4.3 carbon-deployment https://github.com/wso2/carbon-deployment.git v4.5.2
Product-level repository: A product repository consists of the build scripts and profiles that are used for building the product. It also includes the Integration test cases.
For example, given below is the product repository for the WSO2 AS 5.3.0 release. When you build this product repository, all the component repositories that are required for the AS 5.3.0 release (such as the ones listed above) will be automatically fetched from Nexus. Therefore, you can simple clone this repository tag to your computer and build it to get a standard product pack. See the topic on Using Maven to build Git repositories.
Git Repository Name Repository URL Tag for AS 5.3.0 Release product-as https://github.
Cloning a Git repository
Given below are the steps that you need to follow in order to clone a Git repository to your computer.
Clone the repository, so that the files that are in the WSO2 Git repository are available on your computer:
git clone <DEPENDENT_REPOSITORY_URL> <LOCAL_FOLDER_PATH>
For example, clone the
carbon-commonsrepository, which is in the WSO2 Git repository, to a folder named
CC_SOURCE_HOMEon your computer:
git clone https://github.com/wso2/product-as<
Navigate to the <
AS_SOURCE_HOME>directory using the following command:
cd <ASCheck out the tag (branch), which corresponds to the AS 5.3.0 release, to a folder of your choice:the folder in your computer to which the code base is cloned:
- Make sure the build server has an active Internet connection to download dependencies while building.
Clone the dependent repository tag that corresponds to the version of the code base:
git checkout -b <REMOTE_BRANCH/TAG> <LOCAL_BRANCH>
The local branch name should be identical to the remote branch name.
For example, if you want to download the
carbon-commonsrepository tag that was used for the WSO2 AS 5.3.0 release, you need to clone the v4.4.7 tag:
git checkout -b v5b v4.3.0 v5.3.0
Ensure that the following prerequisites are in place before you build:
Building a WSO2 product from source
As explained above in the section on identifying WSO2 Git repositories, you can easily build a product pack by building the product-level Git repository on your computer. However, if you have modified any of the component-level repositories that are used for this product, you need to first build those component repositories before building the product repository. Given below are the steps you need to follow.
Use Maven to build your repositories. See the next topic for instructions on how to use Maven for building repositories.
Once you have built the component-level repositories, build the product-level repository that you have cloned to your computer.
When you build the product repository, Maven will first check in the local Maven repository on your computer and fetch the repositories that you built in Step 1. Maven will then fetch the remaining dependent repositories from Nexus. This process will give you a new product pack with your changes.
You can find the new binary pack (ZIP file), in the
Using Maven to build Git repositories
You can use Maven to build the Git repositories that you clone to your computer.
Prerequisites for using Maven:
Use one of the following maven Maven commands to build your productrepositories:
The binary and source distributions.
|The binary and source distributions, without running any of the unit tests.|
|The binary and source distributions, without running any of the unit tests, in offline mode. This can be done only if you have already built the source at least once.|
Contributing to the WSO2 source code
You can contribute to WSO2 products by committing your changes to GitHub. Whether you are a committer or a non-committer, you can contribute with your code as explained in the Get Involved section.