Issue using apigee deploy maven plugin

Hello,

Trying to use apigee deploy maven plugin to deploy an already exported proxy bundle. I'm using Azure devops and using the below command .

8527-maven-error.jpg

I am getting the below error, though the bundle is not empty.

[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.7:deploy (default-cli) on project DashAPI_maventest: : MojoExecutionException: 400 Bad Request [ERROR] { [ERROR] "code" : "messaging.config.beans.InvalidBundle", [ERROR] "message" : "Bundle is invalid. Empty bundle", [ERROR] "contexts" : [ ] [ERROR] } [ERROR] -> [Help 1]

The whole file bundle is attached here along with the pom xmls in the suggested folder structure for the maven plugin.

src.zip

0 2 555
2 REPLIES 2

@Sai Saran Vaidyanathan could you please help with this query? Am unable to proceed to the next step.

@Aishwarya Kozhisherry

You will see this error if the folder structure is not right or you are trying to run from a different location.

My understanding is, the task will run from $(System.DefaultWorkingDirectory). Although you provided the full path of the maven file, that will be triggered from the default working directory. it will try to search for the apiproxy folder in the current directory which happens to be the default working directory of the pipeline and hence may be complaining that the bundle is not valid or empty.

I think azure devops doesnt have the provision to change your working directory in the maven task to where the api proxy code is present.

I would suggest to have the POM file and the code in the same directory and try it instead of the hierarchy you have i.e. src/gateway/xxx etc.

Alternatively, you can use a commandline task in azure devops and trigger maven from commandline after doing a cd to the appropriate directory. Your build agent should have maven installed for that.

Here is what worked for me and my folder structure for the source is

apigee-ci.jpg

apigee-deployment-folder-structure.jpg