WSO2 Carbon 4.1.x - how to make the distribution - wso2

I have checked out the source code, and built it with mvn clean install.
Now I'm trying to find out how to build the Carbon 4.1.x distribution (wso2carbon-4.1.0.zip)?
Is there a maven target, something like: mvn dist:build-bin that can be run from the root source code folder?

No such special command. If you have built using mvn clean install from the carbon kernel source root level, you can find your expected pack at ROOT/distribution/product/modules/distribution/target/

Related

Artifactories integration with Bazel

I am currently trying to build a project with source in a git repository and some dependencies in an artifactory. I need to first download all the sources and binaries from the repo and artifactory to my local workspace.
I could not find any information regarding artifactory integration with bazel. I can see that this feature has been requested https://www.jfrog.com/jira/browse/RTFACT-15428?jql=labels%20%3D%20bazel.
Is anyone aware of any build tools that can first download resources and then build them?
I need both git and artifactory support.
According to the Bazel documentation for Java, you can define external dependencies resolved to Maven with rule maven_jar.
As Artifactory supports Maven, you can set up your dependencies in a Maven repository, and retrieve artifacts from there with your Bazel build script.
On the other side of the build, publication seems to be a work-in-progress and on the roadmap for Bazel builds.
You can also attempt to write the artifactory rules in Skylark: https://docs.bazel.build/versions/master/skylark/repository_rules.html
Remote build cache
Bazel supports any HTTP 1.1 server with PUT and GET methods as http cache. Simple HTTP Auth is also supported. This means using Artifactory as a remote build cache is straightforward.
Create a new Generic repository in Artifactory.
Now run bazel as
bazel test \
--remote_http_cache=https://user:password#[...].com:8081/artifactory/bazel/ \
test //...
See https://docs.bazel.build/versions/master/remote-caching.html for the relevant Bazel doc.

Blockchain Hyperledger Fabric dev env setup

I am very close to set up dev environment for hyperledger fabric and following this link
https://github.com/IBM-Blockchain/learn-chaincode/blob/master/docs/setup.md
When I run this command git clone -b v0.6 http://gerrit.hyperledger.org/r/fabric
and run go build. I get following error:
can't load package: package github.com/hyperledger/fabric: no
buildable Go source files in
/Users/test/work/src/github.com/hyperledger/fabric
However when I run step 4 from the link, the build success.
cd $GOPATH/src/github.com//learn-chaincode/start
go build ./
Here build is not succeed only for http://gerrit.hyperledger.org/r/fabric.
Any thoughts?
Please suggest!
I think the manual is not precisely written here. You are not supposed to run go build . on the cloned fabric repository. The manual just states here, that if you are getting build errors later, the clone into your go sources did not work. I is not asking you to build the fabric repository. If your build command is executed in step 4, everything should be set up correctly.
Assuming you are setting up the dev environment you want to build things for that after cloning the repo. This is done with make, thus e.g. make all to build and test all.
To build chaincode later on you use go build in the folder where you have the chaincode source file.

How debug wso2 Emm version 2 java souce code?

I want to do some cutomization to the wso2 mdm-product source code (EMM version 2) : https://github.com/wso2/product-mdm
Indeed, when i made some modification to the source code, i need at least 15 min to build the maven projet with eclipce IDE.
Is there other solution to build project directly on carbon server?
How can we debug project with eclipse IDE on carbon IDE?
Usually, it takes some amount of time to build the WSO2 product-mdm, in your case, 15 minutes looks perfectly normal. I'd recommend building the source code using the terminal as follows.
Navigate to the repository directory
cd [path-to-dir]/product-mdm
Perform a clean Maven Build
mvn clean install
If you're unclear about the building process of WSO2 EMM Repositories, the answer on below question might help you to understand the building order.
How to use and understand wso2 git repositories?
Debugging
Remote debugging the project is easy.
Setup the Eclipse IDE for remote debugging as described in this link,
Debugging With Eclipse
Navigate to "[EMM_HOME]/bin/" folder and run the server in debug mode.
sh ./wso2server.sh -debug [specify-port-here]
eg: sh ./wso2server.sh -debug 5005
Once the server is up, you can start debugging.

build wso2 apim 1.10.0 from source

So far I installed deployment version of wso2 AM. Now I would like to build it from source and try running it instead of the binaries I downloaded from the site.
Based on WSO2 documentation, I understand the steps are:
1) Download the carbon kernel source:
git clone -b 4.4.x https://github.com/wso2/carbon-kernel.git
2) Download the APIM source:
git clone https://github.com/wso2/product-apim
3) Build APIM from source
cd <SOURCE-DIR>\product-apim
mvn clean install
Are these steps sufficient, or am I missing something?
Should I build carbon-kernel in addition to building apim-manager?
On previous stackoverflow question, I read that carbon-kernel is not really necessary, and instead i should download and build carbon-apimgmt. Is this correct?
After I build the sources, how do I "package" all the compiled binaries along with all other necessary artifacts, in order to form an equivalent package to the wso2am-1.10.0.zip which I download from the site? Or is there another way to install and run the built code?
Github projects related to API manger can be found in following locations
apimgt component repo:
https://github.com/wso2/carbon-apimgt
This repository contains org.wso2.carbon.apimgt component related source code.
product repo:
https://github.com/wso2/product-apim
This repository contains all the resources needed to build the product package and intergration tests for the product.
master branch of these repositories are used for current development. (if you open parent pom.xml file you would find SNAPSHOT versions). If you build the default branches you would build the current development version of the api manager. (at this time, 1.10.1-SNAPSHOT). To build already released product you need to build released tag.
Steps to Build API manager 1.10.0
clone product:
git clone https://github.com/wso2/product-apim
Checkout release tag v1.10.0:
git checkout v1.10.0
Build the product:
mvn clean install (or mvn clean install -Dmaven.test.skip=true to skip integration tests)
get the product from
product-apim\modules\distribution\product\target
You do not have to build the 'carbon-apimgt' repository because the component build using that is already released and can be found in the nexus repo.
If you want to build the component (say need to provide a fix for a bug) build the 'v5.0.3' tag from the 'carbon-apimgt' repo.
git clone https://github.com/wso2/product-apim
git checkout v5.0.3
I'm posting the steps I did:
git clone https://github.com/wso2/carbon-appmgt
git clone https://github.com/wso2/product-apim
cd <SRC>/carbon-appmgt
mvn clean install
cd <SRC>/product-apim
mvn clean install
The ZIP file was found in
<SRC>\product-apim\modules\distribution\product\target
It is similar to the ZIP file that you download from the site.

How to build WSO2 Identity Server

how to access to svn and build Identy server from sources?
The page http://docs.wso2.org/display/identity/Building+WSO2+Identity+Server+from+source is valid also for 3.2.3?
Installing Identity Server on Linux from Source Distribution [1] Guide.
When you extract the wso2is-3.2.3-src distribution execute mvn clean install from the root level OR if you need to build only 3.2.3 version go inside the /wso2is-3.2.0-src/patch-releases/ folder.
There you will find separate directories for 3.2.1, 3.2.2 and 3.2.3, To build 3.2.3 version, start building from 3.2.3 patch releases pom.xml (mvn clean install from /wso2is-3.2.0-src/patch-releases/3.2.3/ directory).
Please note, 3.2.0 branch needs to be built with maven2.
FYI: To build current trunk, use maven3.