Expand my Community achievements bar.

SOLVED

Error while deployment of AEM project throguh Jenkins

Avatar

Former Community Member

Hello Experts,

I am getting below error at the time of AEM project deployment through Jenkins. Please help.

 

[ERROR] Request to http://localhost:4502/crx/packmgr/service.jsp failed, response=Unauthorized

[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.0.24:install (install-content-package) on project JomProject-Content: Error while installing package. Check log for details. -> [Help 1]
[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] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :JomProject-Content

1 Accepted Solution

Avatar

Correct answer by
Administrator

HI

The same problem was encountered in the forum earlier.

Please find the link for the same below:-

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

//

This issue has been resolved :). I was using <user> which is not applicable for goal package and instead should be using <userId> as per the maven documenation.

http://dev.day.com/docs/en/cq/5-5/core/how_to/how_to_use_the_vlttool/vlt-mavenplugin.html

<plugin>
                <groupId>com.day.jcr.vault</groupId>
                <artifactId>content-package-maven-plugin</artifactId>
                <version>0.0.18</version>
                <configuration>
                    <name>${project.artifactId}</name>
                    <failOnError>true</failOnError>
                    <filterSource>src/main/content/META-INF/vault/filter.xml</filterSource>
                    <builtContentDirectory>src/main/content/jcr_root</builtContentDirectory>
                    <packageFile>target/${project.artifactId}-${project.version}.zip</packageFile>
                    <targetURL>${crx_url}/crx/packmgr/service.jsp</targetURL>
                    <!--  <user>${crx_user}</user> -->
                    <userId>${crx_user}</userId>
                    <password>${crx_password}</password>
                    <verbose>true</verbose>
                    <useProxy>false</useProxy>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>package</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

 

Reference Link:- http://experience-aem.blogspot.in/2015/06/aem-continuous-integration-with-jenkins.html

//AEM Integration with Jenkins.

I hope this would help you a bit.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

View solution in original post

3 Replies

Avatar

Former Community Member

Yes, i am trying same job. Sure will try with new one and let you know.

Avatar

Correct answer by
Administrator

HI

The same problem was encountered in the forum earlier.

Please find the link for the same below:-

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

//

This issue has been resolved :). I was using <user> which is not applicable for goal package and instead should be using <userId> as per the maven documenation.

http://dev.day.com/docs/en/cq/5-5/core/how_to/how_to_use_the_vlttool/vlt-mavenplugin.html

<plugin>
                <groupId>com.day.jcr.vault</groupId>
                <artifactId>content-package-maven-plugin</artifactId>
                <version>0.0.18</version>
                <configuration>
                    <name>${project.artifactId}</name>
                    <failOnError>true</failOnError>
                    <filterSource>src/main/content/META-INF/vault/filter.xml</filterSource>
                    <builtContentDirectory>src/main/content/jcr_root</builtContentDirectory>
                    <packageFile>target/${project.artifactId}-${project.version}.zip</packageFile>
                    <targetURL>${crx_url}/crx/packmgr/service.jsp</targetURL>
                    <!--  <user>${crx_user}</user> -->
                    <userId>${crx_user}</userId>
                    <password>${crx_password}</password>
                    <verbose>true</verbose>
                    <useProxy>false</useProxy>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>package</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

 

Reference Link:- http://experience-aem.blogspot.in/2015/06/aem-continuous-integration-with-jenkins.html

//AEM Integration with Jenkins.

I hope this would help you a bit.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

Avatar

Level 2

Hello,

I am getting below error for the jenkins deployement. Anyone have any solution for this ? We are using Java 7

  at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)

  at hudson.Proc$LocalProc.<init>(Proc.java:244)

  at hudson.Proc$LocalProc.<init>(Proc.java:216)

  at hudson.Launcher$LocalLauncher.launch(Launcher.java:773)

  at hudson.Launcher$ProcStarter.start(Launcher.java:353)

  at hudson.Launcher$ProcStarter.join(Launcher.java:360)

  at hudson.tasks.Maven.perform(Maven.java:329)

  at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)

  at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)

  at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:889)

  at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:656)

  at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:567)

  at hudson.model.Run.execute(Run.java:1665)

  at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:509)

  at hudson.model.ResourceController.execute(ResourceController.java:88)

  at hudson.model.Executor.run(Executor.java:246)

Caused by: java.io.IOException: error=2, No such file or directory

  at java.lang.UNIXProcess.forkAndExec(Native Method)

  at java.lang.UNIXProcess.<init>(UNIXProcess.java:187)

  at java.lang.ProcessImpl.start(ProcessImpl.java:130)

  at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)

  ... 15 more

Build step 'Invoke top-level Maven targets' marked build as failure

Thanks.