Trying to rebuild wso2am-2.1.0-update14 from the source to fix an issue
(moving to newer version may be troublesome because of some customizations made)
building we get an exception
[INFO] WSO2 API Manager - P2 Profile Generation ........... FAILURE [ 34.790 s]
[ERROR] Failed to execute goal org.wso2.maven:carbon-p2-plugin:1.5.4:materialize-product (creating-gateway-manager-profile) on project am-p2-profile: Cannot generate P2 metadata: P2 publisher return code was 13 -> [Help 1]
Failed build step is [INFO] --- carbon-p2-plugin:1.5.4:materialize-product (creating-gateway-manager-profile) @ am-p2-profile ---
[INFO] Command line:
/bin/sh -c cd /home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product && /usr/lib/jvm/java-1.8.0-amazon-corretto.x86_64/jre/bin/java -jar /home/ec2-user/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/plugins/org.eclipse.equinox.launcher_1.2.0.v20110725-1610.jar -nosplash -application org.eclipse.equinox.p2.director -metadataRepository file:/home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/p2-repo -artifactRepository file:/home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/p2-repo -installIU carbon.product.id -profileProperties org.eclipse.update.install.features=true -profile gateway-manager -bundlepool file:/home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/wso2carbon-core-4.4.24/repository/components -shared file:/home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/wso2carbon-core-4.4.24/repository/components/p2 -destination file:/home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/wso2carbon-core-4.4.24/repository/components/gateway-manager -p2.os linux -p2.ws gtk -p2.arch x86 -roaming
Installing carbon.product.id 4.4.24.
Installation failed.
One or more certificates rejected. Cannot proceed with installation.
P2 logfile:
cat /home/ec2-user/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/configuration/1543067992663.log
!SESSION 2018-11-24 13:59:52.546 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_192
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -application org.eclipse.equinox.p2.director -metadataRepository file:/home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/p2-repo -artifactRepository file:/home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/p2-repo -installIU carbon.product.id -profileProperties org.eclipse.update.install.features=true -profile gateway-manager -bundlepool file:/home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/wso2carbon-core-4.4.24/repository/components -shared file:/home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/wso2carbon-core-4.4.24/repository/components/p2 -destination file:/home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/wso2carbon-core-4.4.24/repository/components/gateway-manager -p2.os linux -p2.ws gtk -p2.arch x86 -roaming
Command-line arguments: -application org.eclipse.equinox.p2.director -metadataRepository file:/home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/p2-repo -artifactRepository file:/home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/p2-repo -installIU carbon.product.id -profileProperties org.eclipse.update.install.features=true -profile gateway-manager -bundlepool file:/home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/wso2carbon-core-4.4.24/repository/components -shared file:/home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/wso2carbon-core-4.4.24/repository/components/p2 -destination file:/home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/wso2carbon-core-4.4.24/repository/components/gateway-manager -p2.os linux -p2.ws gtk -p2.arch x86 -roaming
!ENTRY org.eclipse.equinox.p2.engine 8 0 2018-11-24 13:59:55.314
!MESSAGE One or more certificates rejected. Cannot proceed with installation.
Checking the destination /home/ec2-user/dev2/product-apim-2.1.0-update14/modules/p2-profile/product/target/wso2carbon-core-4.4.24/repository/components/gateway-manager
doesn't exist
Anything I need to setup before building the distribution?
Edit:
reading another post Installation failed. One or more certificates rejected. Cannot proceed with installation seems a certificate is really not trusted.
I am building the release with OpenJDK 1.8.0_192 Corretto. Do I need to import any certificate somewhere? (importing the wso2carbon certificate did not help either)