Error during deployment in maven - apigee-edge-maven-plugin:1.0.1:configure (configure-bundle-step) on project lists: null

AKumar15
Participant I

During deployment I am getting below error, could you please suggest:

[ERROR] null

[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.0.1:configure (configure-bundle-step) on project lists: null: MojoExecutionException -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.0.1:configure (configure-bundle-step) on project lists: null at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.MojoExecutor.executeForkedExecutions(MojoExecutor.java:364) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:198) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216) at org.apache.maven.cli.MavenCli.main(MavenCli.java:160) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException at io.apigee.buildTools.enterprise4g.mavenplugin.ConfigureMojo.configurePackage(ConfigureMojo.java:125) at io.apigee.buildTools.enterprise4g.mavenplugin.ConfigureMojo.execute(ConfigureMojo.java:51) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 23 more

Solved Solved
0 23 2,758
1 ACCEPTED SOLUTION

HI @AKumar15

Looks like there is an issue with the plugin. Make sure your apiproxy/{proxyname}.xml has the description tag something like this/

<Description>Test</Description>

More info here

View solution in original post

23 REPLIES 23

HI @AKumar15

Looks like there is an issue with the plugin. Make sure your apiproxy/{proxyname}.xml has the description tag something like this/

<Description>Test</Description>

More info here

Hi @AKumar15

Would recommend you to try if the sample works on your environment (local and travis) and then compare that with your proxy code.

Might need more info to debug and see why it failed. Info like your configurations, what command - options are you executing, etc

I think org detail is there in pom.xml file:

Do I need to mention -Dorg here ? I am not using for other proxies, but those are working.

<profile>
    <id>...</id>
    <properties>
        <apigee.profile>..</apigee.profile>
        <apigee.hosturl>..</apigee.hosturl>
        <apigee.apiversion>..</apigee.apiversion>
        <apigee.org>....</apigee.org>
        <apigee.env>...</apigee.env>
        <apigee.username>${...}</apigee.username>
        <apigee.password>${...}</apigee.password>
    </properties>
</profile>

Any luck with the issue @AKumar15

@AKumar15

Few findings :

1. Make sure the <id>..</id> and <apigee.profile>..</apigee.profile> have the same values. In your case, both are "dev" as you are running for the dev profile [-P dev]. However you can remove the apigee.profile if you want but if its there, make sure they both match EXACTLY. I was able to reproduce the same error on my sample, when i change the value of the apigee.profile to something different (was just doing trial-error to reproduce the issue you were reporting)

Am not sure how you are populating the variables values in the shared-pom (if there are). If its sourced from an env variable, make sure that Travis is passing the same as you mentioned that its working locally and not on Travis. Probably you are passing something locally that Travis is not

2. I was also able to get the error when my mvn command did not have the -P dev argument. Please confirm if Travis includes that in the build

Can you check from Travis logs if it called the mvn command with the -P arg ?

Would it be possible for you to share your config.json and shared-pom.xml with the actual values if there are variables populated programmatically (excluding the creds ofcourse 🙂 )

Not required as I see its mentioned in the pom

Hi Sai Saran Vaidyanathan

After adding Description in the xml, it worked. I am very happy today.. I was not getting time to look into this and was pending since long time. You are great man. It was very hard to debug and identify this tiny issue in configuration file. Good man.

It would be great if you can update this doc, where it is still showing Description as optional parameter:

http://docs.apigee.com/api-services/reference/api-proxy-configuration-reference#-a-name-baseconfig-i...

Thank you @AKumar15 for the updates. Great work @Sai Saran Vaidyanathan !!

@docs , Some feedback related to page here. We need to update the page to reflect changes mentioned by above post.

Hey @Anil Sagar. I updated the doc to say that Description was required. However, Edge currently doesn't validate for a missing Description. For example, I updated a proxy to remove Description, then re-uploaded and deployed without issue. So please file a product bug on the MGMT ticket to validate for Description. Thanks.

hi @AKumar15, @Sai Saran Vaidyanathan ,

We are trying to automate delpoyment via maven, and i am getting same error as Akumar. Did change the <Description> but did not worked. Not sure where to look further, please suggest. Has followed as mentioned here

Hi @anarjinary@wiley.com - can you please open a new post so that we can discuss it there ? Also in the post you create, please add more info

Like the command you are running, pom.xml (if possible) and the output with the error

it got resolved without updating new version (1.0.3) of the apigee-edge-maven-plugin jar

Glad it worked @AKumar15 ! Thanks for the kind words too 🙂

Yes - I have fixed the issue and released 1.0.3. There was a bug in the Cloud UI too and that is fixed as well.

As always - please reach out if you have any questions.

I will check and update you back by tomorrow.

Thanks for taking this up quick.

Yes it is working locally and other proxies are perfectly fine and going through travis-ci. Only one proxy having this issue.

its failing after this command:

$ mvn apigee-enterprise:deploy --settings=settings.xml -q -e -P dev -Dusername=${ORG_USER} -Dpassword=${ORG_PASSWORD}

Let me know what else info you need.

Just curious,

Are you using the exact same mvn command for the others that are working in travis ?

Are there are any difference b/w the travis (yaml) files --> between the ones that are working and this ?

yes I verified that it is same.

HI

I tried the sample thats there in the github and ran the same command you shared. It failed as it requires the org param (-Dorg) which is missing in your mvn command. Not sure you are passing it within the build script. Check that out. I was able to execute the mvn command using both mvn apigee-enterprise:deploy and mvn install. Both worked

To debug further, I might have to see the setup

Did that work @AKumar15 ?

Yes Sai, I still have to look into this based on info you provided.. I will update you in couple of days, got stuck with some other important work 🙂

Hi @AKumar15

The new version (1.0.3) of the apigee-edge-maven-plugin jar is available on Maven central now. This version should have the issue fixed. Should deploy even if the description field is empty. Let me know if you have any issues with the new version.

Appreciate the feedback..

[ERROR] BUILD ERROR

[INFO] ------------------------------------------------------------------------

[INFO] Failed to configure plugin parameters for: io.apigee.build-tools.enterpri se4g:apigee-edge-maven-plugin:1.0.3 Cause: Cannot assign value '' to field: io.apigee.buildTools.enterprise4g.maven plugin.DeployMojo.buildOption; type: java.lang.String

I am getting the above error while try to run

mvn install -Ptest -username={my_email}-password={my_password}

command in my local, I appreciate your help...

here is my pom files

shared-pom.txt

pom.txt

Now again I started looking into this.. will keep you posted... sorry for delay Sai.