Building from Source
WSO2 invites you to contribute by checking out the source of WSO2 EMM from the GitHub, building the product and making changes. You can contribute back by sending a pull a request for review. For information on using Git version control system, go to http://git-scm.com/documentation
Building from the source involves the following steps:
Check out the source
You can either clone or fork the WSO2 EMM Git repository and build from source.
Clone the repository
$ git clone https://github.com/wso2/wso2mobileserver.git
Setting up your development environment
Before you edit the source code in your IDE, set up your development environment by running one of the following commands:
IDE | Command | Additional information |
---|---|---|
Eclipse | mvn eclipse:eclipse | http://maven.apache.org/plugins/maven-eclipse-plugin/ |
IntelliJ IDEA | mvn idea:idea | http://maven.apache.org/plugins/maven-idea-plugin/ |
If you are using an older Eclipse version and if you get errors (library path etc.) when trying to import the source code using the Existing Projects into Workspace, follow the steps below to solve them by importing the source code as a Maven project.
- Build the source using the command:
mvn clean install
Open Eclipse and click Import in the File menu and then click Existing Maven Projects as shown below:
Build using Maven
Prerequisites
- Install Maven and JDK. See Prerequisites for compatible versions.
- Set the environment variable
MAVEN_OPTS="-Xms768m -Xmx3072m -XX:MaxPermSize=1200m"
to avoid the mavenOutOfMemoryError.
- Make sure the build server has an active Internet connection to download dependencies while building.
Following are the commands you can run to create complete release artifacts of WSO2 EMM, including the binary and source distributions.
Command | Description |
---|---|
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've already built the source at least once. |