Issue while creating API Proxy via MAVEN

I am facing the issue as below while running the command:

mvn install -P prod -Dusername=username -Dpassword=mypasswd -Dorg=pratysin-97213-eval

[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.6:deploy (deploy-bundle) on project forecastweatherapi: : MojoExecutionException: 400 Bad Request
[ERROR] <h1>Bad Request (400)</h1>
[ERROR] -> [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

Thanks

Pratyush

0 6 253
6 REPLIES 6

@Pratyush Singh - Will need more info to help. Can you run the maven command with -X and also share the prod profile in your pom.xml ?

Hi Sai

Thanks for your reply. Please find the attachments as you asked and do let me know if you need any further information from my side.

POM.XML

<!-- Copyright (C) 2014 Apigee Corporation Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>parent-pom</artifactId>
<groupId>apigee</groupId>
<version>1.0</version>
<relativePath>../shared-pom.xml</relativePath>
</parent> <modelVersion>4.0.0</modelVersion>
<groupId>apigee</groupId>
<artifactId>forecastweatherapi</artifactId>
<version>1.0</version>
<name>forecastweatherapi</name>
<packaging>pom</packaging>
<!-- optional tests
<profiles>
<profile>
<id>test</id>
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>1.8.1</version>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>install</phase>
<goals>
<goal>jmeter</goal>
</goals>
<configuration>
<skipTests>${skipTests}</skipTests>
<ignoreResultFailures>true</ignoreResultFailures>
<suppressJMeterOutput>false</suppressJMeterOutput>
<propertiesUser>
<testData>weather_test.csv</testData>
<threadNum>5</threadNum>
<rampUpPeriodSecs>5</rampUpPeriodSecs>
<loopCount>2</loopCount>
</propertiesUser>
</configuration>
</execution>
</executions>
<configuration>
<testFilesDirectory>tests</testFilesDirectory>
<testResultsTimestamp>false</testResultsTimestamp>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>prod</id>
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.jmeter</groupId>
<artifactId>jmeter-maven-plugin</artifactId>
<version>1.8.1</version>
<executions>
<execution>
<id>jmeter-tests</id>
<phase>install</phase>
<goals>
<goal>jmeter</goal>
</goals>
<configuration>
<skipTests>${skipTests}</skipTests>
<ignoreResultFailures>true</ignoreResultFailures>
<suppressJMeterOutput>false</suppressJMeterOutput>
<propertiesUser>
<testData>weather_prod.csv</testData>
<threadNum>5</threadNum>
<rampUpPeriodSecs>5</rampUpPeriodSecs>
<loopCount>2</loopCount>
</propertiesUser>
</configuration>
</execution>
</executions>
<configuration>
<testFilesDirectory>tests</testFilesDirectory>
<testResultsTimestamp>false</testResultsTimestamp>
</configuration>
</plugin>
</plugins>
</build>

</profile>
</profiles>
-->
</project>

Regards

Pratyusherror.txt

Thanks @Pratyush Singh for the info

Dont see anything wrong with the config. Can you confirm you are able to ping api.enterprise.apigee.com from your network ?

Hi @Sai Saran Vaidyanathan i tried to ping but host is unreachable.

Also when i started to deploy via Maven i got error as : api.enterprise.om is unreachable. Once i tried to login i was getting 400 error. Post this error i started getting issue as above asked.

Regards

Pratyush

Thats the issue, you need to make sure you are able to access api.enterprise.apigee.com from your network or find what is the firewall details so that you can use that in the maven command. Not sure what you mean by once I login I was getting 400 ??