我为AEM应用程序设置了maven多模块项目:
使用0.0.24版本的com.day.jcr.vault content-package-maven-plugin,通过一个Maven构建通过Jenkins部署应用程序:
mvn clean install -PautoInstallPackage (-D... [admin creds] -D... [server info])
间歇性地,Jenkins构建将失败,因为ui.workflows部署到http://{server}.{port}/crx/packmgr/service.jsp
将失败,并显示以下消息:
[错误]响应中缺少响应状态信息:
检查成功和不成功部署的日志,我可以看到成功的部署请求返回以
开头的 XML 响应 <crx version="1.4.1" user="admin" workspace="crx.default">
以
结束 Package installed in 4098ms.
</log>
</data>
<status code="200">ok</status>
</response>
</crx>
不成功的部署请求会返回以
开头的 HTML 响应 <html>
<head>
<title>Content modified /crx/packmgr/service.jsp</title>
</head>
<body>
<h1>Content modified /crx/packmgr/service.jsp</h1>
<table>
<tbody>
<tr>
<td>Status</td>
<td><div id="Status">200</div></td>
</tr>
我猜测AEM中对服务端点的请求是成功的,但插件无法解析HTML响应。看起来6.2中的AEM正在远离/crx/packmgr/service.jsp端点,以及本文档中的XML响应here
在Adobe Nexus Repo for the maven plugin中,有一个新版本(0.5),这是前一个版本的版本号的重大飞跃,也与AEM 6.2版本发布(2016年4月)一致但我找不到有关如何配置新插件的任何文档。
如果有人遇到过此问题,您是如何解决的?
答案 0 :(得分:2)
有关最新插件的帮助,您可以执行以下操作 -
mvn com.day.jcr.vault:content-package-maven-plugin:0.5.1:help
这将为您提供新插件可用的目标列表。鉴于您正在考虑安装软件包,获取详细信息的目标是install
,您可以键入以下命令以获取配置目标的详细信息 -
mvn com.day.jcr.vault:content-package-maven-plugin:0.5.1:help -Ddetail=true -Dgoal=install
这将为您提供配置详细信息,例如 -
[INFO] Adobe Content Package Maven插件0.5.1 Maven插件 支持创建内容包和控制包 经理远程系统。
content-package:install在远程CRX或上安装内容包 公报5系统。
可用参数:
artifact A string of the form groupId:artifactId:version[:packaging]. User property: vault.artifact artifactId The artifactId of the artifact to install User property: vault.artifactId failOnError (Default: false) If true, fail the build if there is an error while installing. User property: vault.failOnError groupId The groupId of the artifact to install User property: vault.groupId install (Default: true) Whether to install (unpack) the uploaded package automatically or not. User property: vault.install name (Default: ${project.artifactId}) The name of the content package User property: vault.name packageFile (Default: ${project.build.directory}/${project.build.finalName}.zip) The name of the content package file to install on the target system. If not set, the primary artifact of the project is considered the content package to be installed. User property: vault.file packaging (Default: zip) The packaging of the artifact to install User property: vault.packaging password (Default: admin) The password to authenticate against the remote CRX system. Required: Yes User property: vault.password relaxedSSLCheck (Default: false) User property: vault.relaxedSSLCheck repositoryId (Default: temp) The id of the repository from which we'll download the artifact User property: vault.repoId repositoryUrl The url of the repository from which we'll download the artifact User property: vault.repoUrl serverId The server id with which to get the username and password from the user's settings file. User property: vault.serverId serviceURL (Default: http://localhost:4502/crx/packmgr/service/.json) Required: Yes User property: vault.serviceURL targetURL (Default: http://localhost:4502/crx/packmgr/service.jsp) The URL to the HTTP service API of the CRX package manager. See HTTP Service Interface for details on this interface. Required: Yes User property: vault.targetURL timeout (Default: 5) The connection timeout to set when communicating with the package manager service. Default value is 5 seconds. Value is specified in seconds. User property: vault.timeout useProxy (Default: true) Setting this to false disables considering the use of any of the active proxies configured in the Maven Settings. By default the first active proxy configuration in the Maven Settings is used to proxy any request to the package manager. User property: vault.useProxy userId (Default: admin) The user name to authenticate as against the remote CRX system. Required: Yes User property: vault.userId verbose (Default: false) Enable verbose logging when set to true. User property: vault.verbose version The version of the artifact to install User property: vault.version
答案 1 :(得分:1)
我的多模块项目遇到了同样的问题:
这些模块的软件包按上面显示的顺序安装,似乎是个问题。
事实证明,安装第三个软件包时出现了问题,而在error.log
中,资产的某些工作流程出现问题。我不知道究竟是什么原因,但改变包的顺序实际上有所帮助,所以我必须做的是安装包含资产的包并在最后捆绑 。您可以根据项目结构考虑类似的解决方案。
答案 2 :(得分:0)
<plugins>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<executions>
<execution>
<id>install-package</id>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
<version>0.0.24</version>
<extensions>true</extensions>
<configuration>
<failOnError>true</failOnError>
<username>${crx.username}</username>
<password>${crx.password}</password>
</configuration>
</plugin>
</plugins>
答案 3 :(得分:0)
我知道这是一个老问题,但是最近我们遇到了这个问题。更新到content-package-maven-plugin的0.5.24版本可以解决此问题。
在本地计算机上的部署配置文件可以正常运行,但在CI环境中失败,我将为其创建另一个故事并将其链接到此处。