Jenkins build error when I trigger a job to build my AEM project | Community
Skip to main content
chirran414
Level 4
Mar 23, 2018 1:15 AM UTC
Solved

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

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.
Rima_Mittal
Rima_MittalAccepted solution
Level 4
Mar 23, 2018 3:40 PM UTC

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
Level 4
Mar 23, 2018 4:10 PM UTC

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

Translate
Rima_Mittal
Rima_MittalAccepted solution
Level 4
Mar 23, 2018 3:40 PM UTC

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

Translate
smacdonald2008
Level 10
Mar 23, 2018 3:09 PM UTC

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

Translate
Employee
Mar 23, 2018 5:05 AM UTC

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

Translate