Expand my Community achievements bar.

SOLVED

Jenkins build error when I trigger a job to build my AEM project

Avatar

Level 5

Hi Everyone,

I am getting following error when I trigger Jenkins job? I do not understand why it is looking for Localhost when I build it from Jenkins job. If you guys ever faced similar issue please let me know.

Failed to execute goal org.apache.sling:maven-sling-plugin:2.2.0:install (default) on project component-marketplace.core: Installation on http://localhost:4502/crx/repository/crx.default failed, cause: Connection refused (Connection refused) -> [Help 1]

Screen Shot 2018-03-22 at 6.05.18 PM.png

Thanks,

Narayana.

1 Accepted Solution

Avatar

Correct answer by
Level 4

This is because the Jenkins server cannot access the AEM server(localhost).

You are trying to build and also autoInstallPackage to the AEM server using aem.host and aem.port property in pom.xml. Please double check.

Thanks

Rima Mittal

View solution in original post

4 Replies

Avatar

Employee

In my opinion the installation endpoint is incorrect.  It should be something like /crx/packmgr/service.jsp to push the packages from jenkins

Avatar

Correct answer by
Level 4

This is because the Jenkins server cannot access the AEM server(localhost).

You are trying to build and also autoInstallPackage to the AEM server using aem.host and aem.port property in pom.xml. Please double check.

Thanks

Rima Mittal

Avatar

Level 4

@chirran414

I believe you did not have set your server's URL in your POM File.

1. Either you can add different profile in your POM where all your server environments i.e. LOCAL/DEV/TEST/PROD URL would be there and use it with Jenkins

2. Or different POM in different branch of your code branch for  LOCAL/DEV/TEST/PROD with URL for their respective server.

Hope this helps.