2

We have been trying to build wso2 (various products) from source to no avail.

I have looked for information all over (with assistance from Google) and followed the few instructions we have found but without luck.

I have, on the other hand, found various posts discussing this process and how error prone it is due to this or that.

Don't get me wrong, WSO2 looks like an amazing framework to work within but confidence in the project is not boosted by the complicated/error prone/enormous build process.

Does anyone here have a good description/recipes to build the 4.x.x version of carbon?

Chris Snow
  • 23,813
  • 35
  • 144
  • 309
Acmeguy
  • 131
  • 4
  • Censorship is not a good sign (No thanks for changing my question). I realize that my question was not as polite as it could be but, after trying to build WSO2 for quite some time, I think it's a valid question deserving a direct answer from someone responsible. Is WSO2 intentionally hard to build? WSO2 seems to be well designed and thought through on so many different levels. That fact begs the question - Why is the build process so unbelievable cumbersome, is it intentional? – Acmeguy Jul 30 '13 at 07:30
  • Hi Acmeguy - sorry for offending! The objective for changing the title was not to censor the post, but to make the post more applicable to a wider audience. Btw, I too have had the same thoughts as you in the past about WSO2 - building the product is painful and it is difficult to get support. However, I think this is down to the WSO2 engineers being so busy. When I subscribed to the [mailing lists](http://wso2.com/mail), I was amazed at the hive of activity that is going on. – Chris Snow Jul 31 '13 at 14:38

1 Answers1

3

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.

Community
  • 1
  • 1
Chris Snow
  • 23,813
  • 35
  • 144
  • 309
  • Hi and thanks, Can you please explain why the patch route is required? Would it not be OK to check out 4.0.6 and build that directly? My first mistakes were to use Java 1.7.x and to use standard maven memory settings (now allowed to use up to 3gb of memory) – Acmeguy Jul 29 '13 at 22:11
  • You can build from a tagged version. I guess WSO2 engineers normally build using the patch-release approach as it allows then to flip more easily between different versions when bug fixing, etc. Here is a previous post asking a similar question: http://stackoverflow.com/questions/17358459/wso2-svn-structure-documentation/17358984#17358984 – Chris Snow Jul 30 '13 at 05:35