apigee / apigee-deploy-maven-plugin

Apache License 2.0
80 stars 167 forks source link

Error when specifying <apigee.options> #203

Closed andythehood closed 1 year ago

andythehood commented 1 year ago

I'm getting errors when configuring various in my pom.xml with 2.3.5

For example, specifying validate</apigee.options> results in this error:

[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:2.3.5:deploy (deploy-bundle-step) on project currency-v1: MojoExecutionException: No enum constant io.apigee.buildTools.enterprise4g.mavenplugin.DeployMojo.OPTIONS.validate -> [Help 1]

Similarly for update</apigee.options>:

[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:2.3.5:deploy (deploy-bundle-step) on project currency-v1: MojoExecutionException: No enum constant io.apigee.buildTools.enterprise4g.mavenplugin.DeployMojo.OPTIONS.update -> [Help 1]

Also, while override</apigee.options> works, doesn't:

[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:2.3.5:deploy (deploy-bundle-step) on project currency-v1: MojoExecutionException: com.google.api.client.http.HttpResponseException: 400 Bad Request [ERROR] { [ERROR] "error": { [ERROR] "code": 400, [ERROR] "message": "Invalid JSON payload received. Unknown name \"delay\": Cannot bind query parameter. Field 'delay' could not be found in request message.", [ERROR] "status": "INVALID_ARGUMENT", [ERROR] "details": [ [ERROR] { [ERROR] "@type": "type.googleapis.com/google.rpc.BadRequest", [ERROR] "fieldViolations": [ [ERROR] { [ERROR] "description": "Invalid JSON payload received. Unknown name \"delay\": Cannot bind query parameter. Field 'delay' could not be found in request message." [ERROR] } [ERROR] ] [ERROR] } [ERROR] ] [ERROR] } [ERROR] } [ERROR] -> [Help 1]

pom.xml.txt

ssvaidyanathan commented 1 year ago

@andythehood - Please refer to this README for Apigee X/hybrid versions. You were probably looking at the Edge/OPDK README that supports options like validate and update. Version 2.x of the plugin does not support those options.

Same applies for apigee.override.delay. Check this doc

andythehood commented 1 year ago

Thanks Sai. Yes, I had copied the pom from an older Edge project, and was refering to the Readme from the default master branch.

But I've now noticed the Note in it that says to use the hybrid branch for the 2.x version for X/Hybrid.

ssvaidyanathan commented 1 year ago

Perfect! Ok to close this issue?

andythehood commented 1 year ago

Sure, good with me.

Although it does seem a little odd to me that the default branch is still for the older Edge/OPDK version and you have to switch to a branch named 'hybrid' for the current ApigeeX version.

ssvaidyanathan commented 1 year ago

great point @andythehood

I have updated the default branch to be "main" and its pointing to the Apigee X/hybrid version

The Edge/OPDK version is on a branch name "1.x"