How to build WSO2 4.X from source?

2019-07-19 18:46发布

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?

1条回答
Deceive 欺骗
2楼-- · 2019-07-19 19:05

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.

查看更多
登录 后发表回答