Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

CICD using git, jenkin and apigee.

Hello All,

As I m trying to deploy API proxy using git and Jenkins. Below is my successful configuration.

1. I m able to connect to git (clone, pull, commit, push ) through a local computer.

2. In Jenkins job built it able to configured and take a path from git lab repository.

3. While building the job I m getting below error "Failed to getClass for io.apigee.buildTools.enterprise4g.mavenplugin.DeployMojo"

=============Now zipping the App Bundle================


[WARNING] Failed to getClass for io.apigee.buildTools.enterprise4g.mavenplugin.DeployMojo
[INFO] 
[INFO] <<< apigee-edge-maven-plugin:1.0.3:deploy (deploy-bundle) < package @ CICDDemo <<<
[INFO] 
[INFO] 
[INFO] --- apigee-edge-maven-plugin:1.0.3:deploy (deploy-bundle) @ CICDDemo ---
[INFO] 

=============Initializing Maven Deployment================


[INFO] 

=============Importing App================


[ERROR] 


* * * * * * * * * * *

This deployment could have failed for a variety of reasons.



* * * * * * * * * * *



[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenArtifactArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenFingerprinter$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.548 s
[INFO] Finished at: 2018-11-19T14:58:15+05:30
[INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "test" could not be activated because it does not exist.
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.0.3:deploy (deploy-bundle) on project CICDDemo: MojoExecutionException: NullPointerException -> [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

Below is the maven pom file,
pom.txt



If you need any more infomation please let me know.

Any pointer/lead would help me here would be really appreciated. @Dino @Sai Saran Vaidyanathan @Anil Sagar @ Google @Siddharth Barahalikar

Solved Solved
2 9 5,774
1 ACCEPTED SOLUTION

@Mohsin Khan

Not sure what is the mvn command you are running. From the WARNING, looks like you are calling the maven command with the test profile "-P test" but your pom only has a "dev" profile in it. So either include a test profile in your pom or else change the mvn command you are running to use the dev profile

mvn clean install -P dev -Dorg=<org> -Dusername=<user> -Dpassword=<password>

In the pom you shared the env used is hardcoded to "dev", so make sure you have that in your Apigee organization, if not change that from

<apigee.env>dev</apigee.env>

to

<apigee.env>${env}</apigee.env>

and include that in your maven command

mvn clean install -P dev -Dorg=<org> -Dusername=<user> -Dpassword=<password> -Denv=<env>

Hope this helps

View solution in original post

9 REPLIES 9