-->

What is the appropriate way to build WSO2 Carbon t

2019-02-16 01:48发布

问题:

I'm trying to build multiple tags of WSO2 Carbon side-by-side for comparison purposes, but I'm concerned I may be missing something about the directory layout and how to do the builds. Please could I have some help?

At present, I've checked out what I think are the relevant tags from:

  • https://svn.wso2.org/repos/wso2/tags/carbon/3.0.0/
  • https://svn.wso2.org/repos/wso2/tags/carbon/3.1.0_core/
  • https://svn.wso2.org/repos/wso2/tags/carbon/3.2.0/
  • https://svn.wso2.org/repos/wso2/tags/carbon/3.2.2/
  • https://svn.wso2.org/repos/wso2/tags/carbon/3.2.3/

I've then tried running Maven builds from the top-level directories of each of the checkouts (in various ways, some involving skipping the tests and others not), with varying results (almost all of them unsuccessful in one way or another, whether due to missing artifacts, failing tests or other reasons). I also tried building 3.2.2 and 3.2.3 from the .../carbon/3.2.2/patch-releases/3.2.2 directory and the .../carbon/3.2.3/patch-releases/3.2.3 directories, as per the answer @ThiliniIshaka gave here:

WSO2 sourcecode of identity server (wso2is-3.2.3-src.zip) is always built with errors

This seemed to work (after some fiddling around) for 3.2.2, but some of the tests for 3.2.3 fail and this pulls down the build (I can make it work with the -fn flag to Maven, but that just results in what looks like an incomplete build). Furthermore, the earlier tags don't seem to have a corresponding patch-releases directory, so the same technique won't work for them even if I get it working for 3.2.3.

As an aside, I'm also deeply confused by things such as the 3.2.2 tag containing a 3.2.3 directory under patch-releases, etc.

All of this leads me to think I may be missing the point in some fundamental manner :)

The questions I thus have are:

  1. Am I checking out the right things in the first place?
  2. From which directories and how should I be building each of the tags please?
  3. Do I need the same version of Maven for all of the tags?
  4. Is there any good build documentation for the various different versions explaining some of this please? I've found various technical blogs, but seemingly nothing foolproof and comprehensive (I'm probably looking in the wrong places).

Many thanks.

回答1:

Answering for the above queries;

  1. Yes, these tags are created for relevant branch and point releases of carbon.
  2. As the previous thread suggests [1] you can build the source, could you please provide us with the issues you get when building the source?
  3. Yes, you need to build above tags with maven2. Only the trunk [2] (where the normal developments going on) needs maven 3.
  4. Some hints are provided in this blog post. Start from the root level with mvn install (to skip running tests, build with mvn install -Dmaven.test.skip=true). If you are to build tags related to point releases, build from patch-releases directory.

Hope this helps.

Thanks