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]
I downloaded and set the path for Maven, set MAVEN_OPTS variable as per the documentation. https://wso2.github.io/using-maven.html
Thanks in advance.
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/