AEM 包管理器返回 html 而不是 xml [错误] 响应中缺少响应状态信息:

gff*_*fny 5 java adobe maven jenkins aem

我为 AEM 应用程序设置了一个 maven 多模块项目:

  • ui.apps
  • 启动器
  • 测试
  • ui.workflows(最近添加)

该应用程序使用 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将失败并显示以下消息:

[ERROR] 响应中缺少响应状态信息:

检查成功和不成功部署的日志,我可以看到成功的部署请求返回以开头的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 响应

Adobe Nexus Repo for the maven plugin 中,有一个新版本(0.5),与之前的版本号相比,版本号有了很大的飞跃,也与 AEM 6.2 版本发布(2016 年 4 月)相吻合,但我找不到任何关于如何配置新插件的文档。

如果有人遇到过这个问题,你是如何解决的?

Ame*_*kha 2

如需有关最新插件的帮助,您可以执行以下操作 -

mvn com.day.jcr.vault:content-package-maven-plugin:0.5.1:help
Run Code Online (Sandbox Code Playgroud)

这将为您提供新插件可用的目标列表。鉴于您正在考虑安装该软件包,获取详细信息的目标是install,您可以键入以下命令来获取配置目标的详细信息 -

mvn com.day.jcr.vault:content-package-maven-plugin:0.5.1:help -Ddetail=true -Dgoal=install
Run Code Online (Sandbox Code Playgroud)

这将为您提供配置详细信息,例如 -

[INFO] Adob​​e Content Package Maven Plugin 0.5.1 Maven 插件支持创建内容包并控制远程系统上的包管理器。

content-package:install 在远程 CRX 或 Communique 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
Run Code Online (Sandbox Code Playgroud)