[Download]
| [Documentation Home] | [Release Note]
Source Distribution
This page explains how to build the WSO2 AppServer using the source
distribution of the release. First download the AppServer source
distribution from here.
System Requirements
| Java Runtime Environment |
1.6.x (For instructions on setting up the JRE in different
operating systems, visit http://java.sun.com) |
| Maven |
2.2.0 or higher (download). |
| Operating System |
Tested on Windows XP, Windows Vista, Linux (Fedora core, Ubuntu and Gentoo),
Mac OS X & Sun Solaris |
Setting Up the Environment and Tools
Maven:
The WSO2 AppServer build is based on Maven. Hence, a prerequisite to
build WSO2 AppServer from the source distribution is to have Maven and JDK
installed. Extensive instructions are available on the Maven site.
You may need to set the MAVEN_OPTS if you come across OutOfMemory errors during
the build. e.g. you may need to set MAVEN_OPTS=-Xmx1024m -XX:MaxPermSize=128m
This guide however contains the easiest path for quick environment
setting. Advanced users can learn more about
Maven.
- MS Windows
- Download and run the Windows installer package
- Set the 'Environment Variables' (create the system variable M2_HOME and
edit the path. e.g., "set M2_HOME=C:\Program Files\Apache Software
Foundation\maven-2.0.x"; set path=%path%;%M2_HOME%\bin)
- Make sure that the system variable JAVA_HOME is set to the location of
your JDK, e.g., C:\Program Files\Java\jdk1.5.0_02
- Run 'mvn --version' to verify that it is correctly installed.
- Unix based OS (Linux etc)
- Download maven tar ball or the zip archive
- Extract it to a directory of choice
- Set the environment variable M2_HOME and add M2_HOME/bin to the path as well
- You can also refer to more instructions on how
to install Maven in Unix based operating systems.
Once Maven is properly installed, you can start building the WSO2 AppServer for
Java.
Building WSO2 AppServer from the Source Distribution
The
source distribution
is available as a zipped archive. All the necessary build
scripts are included with the source distribution. Expand the source archive
to a directory of your choice. You can run the following commands inside that
directory to build the WSO2 AppServer.
Note: The first time you run Maven, it will automatically
download the dependent .jars. Therefore, the first run will take more
time. The third party libraries required by WSO2 AppServer will be downloaded from the
Maven2 repositories specified in the main pom.xml file.
The list of commands that can be run are as follows. Please note that the released source
distribution contains sources for all the WSO2 Carbon based products. Therefore if you only
want to build the WSO2 AppServer, you have to always use the option "-Dproduct=wsas".
| mvn clean install -Dproduct=wsas |
To create the complete release artifacts of WSO2 AppServer including the
binary and source distributions. |
| mvn clean install -Dmaven.test.skip=true -Dproduct=wsas |
To create the complete release artifacts of WSO2 AppServer including the binary and
source distributions, without running any of the unit tests. |
| mvn clean install -Dmaven.test.skip=true -Dproduct=wsas -o |
To create the complete release artifacts of WSO2 AppServer including 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. |
All the sources of the major 3rd party components included in WSO2 AppServer can be found in
the source distribution. For the purpose of debugging applications, you could attach these sources.