Search code examples
wso2wso2-api-manager

WSO2 API Manager (4.2.0) - How to build the latest version using the source?


I am trying to build the latest version of WSO2 API Manager wso2am-4.2.0 and the following error appears when I run the mvn clean install command in the <PRODUCT_HOME>\modules\distribution\product directory.

The project org.wso2.am:wso2am:4.2.0 (D:\APIM 4.2.0\product-apim-4.2.0\modules\distribution\product\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for org.wso2.am:am-parent:4.2.0: Could not transfer artifact org.wso2:wso2:pom:1.3 from/to wso2-nexus (https://maven.wso2.org/nexus/content/groups/wso2-public/): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target and 'parent.relativePath' points at wrong local POM @ org.wso2.am:am-parent:4.2.0, D:\APIM 4.2.0\product-apim-4.2.0\pom.xml, line 31, column 13 -> [Help 2]

enter image description here

I downloaded and set the path for Maven, set MAVEN_OPTS variable as per the documentation. https://wso2.github.io/using-maven.html

  1. How can I resolve this issue?
  2. Is there a more detailed descriptive documentation on building the product?

Thanks in advance.


Solution

  • You need to give the mvn clean install command from the parent directory. In your case, it would be D:\APIM 4.2.0\product-apim-4.2.0.

    You can skip the tests with the following command which will build the binary and source distributions.

    mvn clean install -Dmaven.test.skip=true
    

    Once the build is completed the zip file can be found at modules/distribution/product/target

    For more information refer,

    https://wso2.github.io/using-maven.html

    https://www.yenlo.com/blogs/building-wso2-api-manager-from-scratch/