Wednesday, August 31, 2011

How to build wso2 stratos 1.5.1 from the source

WSO2 Stratos is the most complete, enterprise-grade, open PaaS, with support for more core services than any other available PaaS today.
WSO2 Stratos provides the core cloud services and essential building blocks for example federated identity and single sign-on, data-as-a-service and messaging-as-a-service and more, required for developing SaaS and cloud applications.
Here below i will describe how to build stratos 1.5.1 from source.
You will find more information on wso2 stratos main page from this Link

Download stratos source from the hosted location
$ wget http://dist.wso2.org/products/stratos/1.5.1/wso2-stratos-1.5.1-src.zip

unzip content into some given location
unzip wso2-stratos-1.5.1-src.zip

go inside the extracted folder and start build it on line
stratos151src@sr2:~/stratos151src$mvn clean install

if it fails due to some reason(may be due to on line repo problems) follow the below guide lines.
In order to build carbon products we need to build axis2 first if that is not available at online repos

stratos151src@sr2:~/stratos151src/wso2-stratos-1.5.1-src/dependencies/axis2/1.6.1-wso2v1
Then build dependencies
And continue build in following order with given commands
stratos151src@sr2:~/stratos151src/wso2-stratos-1.5.1-src/dependencies$ mvn clean install

stratos151src@sr2:~/stratos151src/wso2-stratos-1.5.1-src/orbit$ mvn clean install -Dmaven.test.skip=true

stratos151src@sr2:~/stratos151src/wso2-stratos-1.5.1-src/service-stubs$ mvn clean install -Dmaven.test.skip=true
You must build carbon core with tests so use following command
stratos151src@sr2:~/stratos151src/wso2-stratos-1.5.1-src/core$ mvn clean install

Before build components we have to little change for stratos pom.xml file. Due to the error in pom file location of
org.wso2.carbon.tenant.dispatcher folder.

So lets see how we can do that modification
Go to stratos folder as follows
stratos151src@sr2:~/stratos151src/wso2-stratos-1.5.1-src/components/stratos$ vi pom.xml

Do the following change
replace line
org.wso2.carbon.tenant.dispatcher/3.2.0
with
org.wso2.carbon.tenant.dispatcher/1.5.1

Then build components
stratos151src@sr2:~/stratos151src/wso2-stratos-1.5.1-src/components$mvn clean install

Then we have to build features
stratos151src@sr2:~/stratos151src/wso2-stratos-1.5.1-src/features$mvn clean install

Then we have to build products and services
stratos151src@sr2:~/stratos151src/wso2-stratos-1.5.1-src/products$ ls
as  bam  bps  brs  carbon  cep  css  dss  esb  greg  gs  is  lb  manager  mb  ms  pom.xml  wsf

here you will see available products inside products folder
if you need to build appserver product and service use the following command. same way you can do this for other products as well

stratos151src@sr2:~/stratos151src/wso2-stratos-1.5.1-src/products/as/4.1.1$mvn clean install
Then built packs will be available on following location
stratos151src@sr2:~/stratos151src/wso2-stratos-1.5.1-src/products/as/4.1.1/modules/distribution/service/target






No comments:

Post a Comment