I really don't think it is intentionally hard to build. The product is huge with tons on developers working on it. Most of the issues seem to be around erroneous commits by developers. My understanding is that WSO2 will be changing the development process to make it more robust (source: Manoj's Comment).
The WSO2 set of products are awesome and well engineered. They can be built, but you will need to persist and resolve issues along the way.
It took me quite a few days to get a working build in my spare time. Here is a rough sequence of tasks to perform:
1) Checkout the 4.0.0 branch:
svn co https://svn.wso2.org/repos/wso2/carbon/orbit/branches/4.0.0
svn co https://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.0.0
svn co https://svn.wso2.org/repos/wso2/carbon/platform/branches/4.0.0
For more information of the code base high level structure, see here: what is wso2 'orbit', 'kernel' and 'platform'?
2) Decide which version of a product you need to build - Which version of patch-release to build?
3) Build the three separate code bases (build the main branch plus patch-release versions below your required version).
- build orbit 4.0.0/ Then build orbit/patch-release/4.0.x
- build kernel 4.0.0/ Then build kernel/patch-release/4.0.x
- build platform 4.0.0/ Then build platform/patch-release/4.0.x
Note to build:
- use Java 6 (Use Sun/Oracle JDK - not OpenJDK)
- use Maven 3
- set MAVEN_OPTS to
-Xms512m -Xmx1024m -XX:MaxPermSize=1024m
- you will probably need to use the following mvn command line:
mvn clean install -Dmaven.test.skip=true
You will find the built distribution zip file here: ROOT/distribution/product/modules/distribution/target/
(source: WSO2 Carbon 4.1.x - how to make the distribution)
Be prepared to put in the time to hunt down and fixing issues as you encounter them. Most issues seem to be due to maven dependency issues. Using google, you can usually find the answer. Also you post any issues you need help with on stackoverflow.