Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

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, if you want to enhance or modify certain features in the product, or introduce completely new functionality, you can do that by downloading the source code, making the necessary changes and building your own customized product.

The following topics describe this process:

Downloading the source

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 list of Git repositories that are used for building the WSO2 AS 5.3.0 release.

Follow the steps given below to download each of the above repositories for AS 5.3.0.

  1. Clone the relevant Git repository to a folder of your choice. The location of the extracted source is referred to as <gitrepo_SOURCE_HOME>. For example, to clone the Git repository for Carbon4 Kernel, use the following command:
    git clone <carbon4kernel_SOURCE_HOME>

  2. Navigate to the <gitrepo_SOURCE_HOME> directory using the following command:
    cd <gitrepo_SOURCE_HOME>

  3. Check out the tag (branch), which corresponds to the AS 5.3.0 release, to a folder of your choice:
    git checkout -b <REMOTE_BRANCH/TAG> <LOCAL_BRANCH> 

    For example, to check out the tag for Carbon4 Kernel, use the following command:
    git checkout -b v4.4.1 v4.4.1

After the source code is downloaded, you can start editing. However, it is recommended to run a build prior to changing the source code to ensure that the download is complete.

Editing the source code

Now that you have downloaded the source code for the AS project from GitHub, you can prepare your development environment and do the required changes to the code. 

  1. To edit the source code in your IDE, set up your development environment by running one of the following commands:

  2. Add the required changes to the source code.

Building the product

Ensure that the following prerequisites are in place before you build:

  1. Make sure the build server has an active Internet connection to download dependencies while building.
  2. Install Maven and JDK. See Installation Prerequisites for compatible versions. 
  3. Set the environment variable  MAVEN_OPTS=”-Xms1024m -Xmx4096m -XX:MaxPermSize=1024m” to avoid the Maven OutOfMemoryError.

Use the following maven commands to build your product:

mvn clean install

The binary and source distributions.

mvn clean install -Dmaven.test.skip=true The binary and source distributions, without running any of the unit tests.
mvn clean install -Dmaven.test.skip=true -o
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.

Committing your changes

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.

  • No labels