Hi,
i am facing problem while deploy proxy using apigee deploy plugin. It is not able to use proxy to connect api.enterprise.apigee.com.
I tried below options:
===============================================================
set MAVEN_OPTS -Dhttp.proxyHost=<PROXY_HOST> -Dhttp.proxyPort=<PROXY_PORT>
mvn clean install -Ptest -Dusername=<USER_NAME> -Dpassword
Connection timeout
===============================================================
mvn clean install -Ptest -Dusername=<USER_NAME> -Dpassword -Dhttp.proxyHost= -Dhttp.proxyPort=8080
Connection timeout
===============================================================
both did not work. please suggest. I am using below plugin.
<plugin><br> <groupId>io.apigee.build-tools.enterprise4g</groupId><br> <artifactId>apigee-edge-maven-plugin</artifactId><br> <executions><br> <execution><br> <id>configure-bundle-step</id><br> <phase>package</phase><br> <goals><br> <goal>configure</goal><br> </goals><br> </execution><br> <!--deploy bundle --><execution><br> <id>deploy-bundle-step</id><br> <phase>install</phase><br> <goals><br> <goal>deploy</goal><br> </goals><br> </execution><br> </executions><br></plugin>
Hi Vinit, could you also attach full output log?
Please find the logs:
(230 kB at 3.2 MB/s)
[INFO] Installing /tmp/build/f20d6f52/repo/uComServices/pom.xml to /root/.m2/repository/apigee/uComServices-v1/-/uComServices-v1--.pom
[INFO]
[INFO] --- apigee-edge-maven-plugin:1.1.6:deploy(deploy-bundle-step) @ uComServices-v1 ---
[INFO]
=============Initializing Maven Deployment================
[INFO]
Request prepared for the server
**************************
GET [https://api.enterprise.apigee.com/v1/organizations/firstdatanp/apis/uComServices-fbdrxjn-v1/deployments](https://api.enterprise.apigee.com/v1/organizations/firstdatanp/apis/uComServices-fbdrxjn-v1/deployments)
accept: application/json
accept-encoding: gzip
authorization: Basic [Not shown in log]
[ERROR] connect timed out
[INFO]
=============Importing App================
[INFO]
Request prepared for the server
**************************
POST [https://api.enterprise.apigee.com/v1/organizations/firstdatanp/apis?action=import&name=uComServices-fbdrxjn-v1](https://api.enterprise.apigee.com/v1/organizations/firstdatanp/apis?action=import&name=uComServices-fbdrxjn-v1)
accept: application/json
accept-encoding: gzip
authorization: Basic [Not shown in log]
content-type: application/octet-stream
[Request body contains data, not shown]
[ERROR]
* * * * * * * * * * *
This deployment could have failed for a variety of reasons.
* * * * * * * * * * *
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.454 s
[INFO] Finished at: 2018-01-16T01:17:30Z
[INFO] Final Memory: 16M/402M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.6:deploy(deploy-bundle-step) on project uComServices-v1: : MojoExecutionException: connect timed out -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] [http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException](http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException)
Here is debug logs for apigee plugin.
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal: io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.6:deploy (deploy-bundle-step)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<apiType>${apigee.apitype}</apiType>
<apiVersion>${apigee.apiversion}</apiVersion>
<artifactId>${project.artifactId}</artifactId>
<authType default-value="basic">${apigee.authtype}</authType>
<baseDirectory>${basedir}</baseDirectory>
<bearer>${apigee.bearer}</bearer>
<buildDirectory>${project.build.directory}</buildDirectory>
<buildOption>${build.option}</buildOption>
<clientid>${apigee.clientid}</clientid>
<clientsecret>${apigee.clientsecret}</clientsecret>
<delay>${apigee.delay}</delay>
<deploymentEnv default-value="${apigee.profile}">${apigee.env}</deploymentEnv>
<hostURL>${apigee.hosturl}</hostURL>
<id>${apigee.profile}</id>
<mfaToken>${apigee.mfatoken}</mfaToken>
<options>${apigee.options}</options>
<orgName>${apigee.org}</orgName>
<overridedelay>${apigee.override.delay}</overridedelay>
<password>${apigee.password}</password>
<projectName>${project.name}</projectName>
<projectVersion>${project.version}</projectVersion>
<refresh>${apigee.refresh}</refresh>
<revision>${apigee.revision}</revision>
<skip default-value="false"/>
<tokenURL default-value="https://login.apigee.com/oauth/token">${apigee.tokenurl}</tokenURL>
<userName>${apigee.username}</userName>
</configuration>
Assuming the problem is in the proxy server setup, based on https://community.apigee.com/questions/39268/apigee-maven-plugin-behind-corporate-proxy.html, the solution is to set MAVEN_OPTS environment variable.
MAVEN_OPTS : -Dhttp.proxyHost=<httpproxyaddresshost> -Dhttp.proxyPort=8080 -Dhttps.proxyHost=<httpsproxyaddresshost> -Dhttps.proxyPort=8080
What do you get when you echo the value of the environment variable?