Jenkins build error when I trigger a job to build my AEM project | Community
Skip to main content
chirran414
New Participant
March 23, 2018
Solved

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

  • March 23, 2018
  • 4 replies
  • 3774 views

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]

Thanks,

Narayana.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Rima_Mittal

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

4 replies

navinkaushal
New Participant
March 23, 2018

@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.

Rima_Mittal
Rima_MittalAccepted solution
New Participant
March 23, 2018

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

smacdonald2008
New Participant
March 23, 2018

Why use that tool over Maven directly?

Maven builds AEM projects without issue -- Scott's Digital Community: Creating an Adobe Experience Manager 6.3 Project using Adobe Maven Archetype 12

Employee
March 23, 2018

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