Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

WSO2 invites you to contribute by downloading the source code from the GitHub source control system, building the product and making changes, and then committing your changes back to the source repository. The following sections describe this process:

Table of Contents
maxLevel3

...

source code

...

WSO2 products are built on top of WSO2 Carbon Kernel, which contains the Kernel libraries used by all products. When there are changes in the Carbon Kernel, they are bundled and released in a new WSO2 Carbon version (for example, WSO2 Carbon 4.3.0). You can download the complete WSO2 Kernel release using the following repository: https://github.com/wso2/carbon4-kernel, which is recommended if you intend to modify the source. 

After downloading the source of the Carbon Kernel, execute the following commands to download the source of the product:

...

Clone carbon-device-mgt. The folder will be referred to as <CARBON_DEVICE_MGT> throughout the documentation.

Code Block
git clone https://github.com/wso2/carbon-device-mgt.git

...

Clone carbon-device-mgt-plugin. The folder will be referred to as <CARBON_DEVICE_MGT_PLUGIN> throughout the documentation.

Code Block
git clone https://github.com/wso2/carbon-device-mgt-plugins.git

...

Code Block
git clone https://github.com/wso2/product-mdm.git
Note

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 Carbon 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:

    If you are using a later Eclipse version and if you get errors (library path etc.) when trying to import the source code using the Existing Projects into Workspace option, you can solve them by importing the source code as a Maven project. To do this; open Eclipse and click Import in the File menu and then click Existing Maven Projects as shown below: 

    Image Removed

  2. Add the required changes to the source code. 

...

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

  • Make sure the build server has an active Internet connection to download dependencies while building.
  • Install Maven and JDK. For compatible versions, see Installation Prerequisites.
  • 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:

CommandDescription
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.
Info

In EMM, you need to build the three repositories mentioned under downloading the source in the given order. Once the build is complete you will find the pack in the <EMM_SOURCE_HOME>/modules/distribution/target directory, as wso2emm-2.0.1.zip.

Note

By default the pack you build includes the Android operations. To include the iOS operations you need to configure the pack with the iOS client configurations and iOS server configurations.

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.of all WSO2 products as 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. For more information, see the following: