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

Java AEM程序包管理器返回html而不是xml[错误]响应中缺少响应状态信息:,java,maven,jenkins,adobe,aem,Java,Maven,Jenkins,Adobe,Aem,我为AEM应用程序设置了一个maven多模块项目: 核心 ui.apps 发射装置 it测试 ui.workflows(最近添加) 该应用程序通过Jenkins使用0.0.24版本的com.day.jcr.vault内容包Maven插件通过Maven构建进行部署: mvn干净安装-PautoInstallPackage(-D..[admin creds]-D..[server info]) Jenkins构建将间歇性失败,因为将ui.workflows部署到http://{server}.{

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

  • 核心
  • ui.apps
  • 发射装置
  • it测试
  • ui.workflows(最近添加)
该应用程序通过Jenkins使用0.0.24版本的com.day.jcr.vault内容包Maven插件通过Maven构建进行部署:

mvn干净安装-PautoInstallPackage(-D..[admin creds]-D..[server info])

Jenkins构建将间歇性失败,因为将ui.workflows部署到
http://{server}.{port}/crx/packmgr/service.jsp将失败,并显示以下消息:

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

在查看成功和不成功部署的日志时,我可以看到成功的部署请求返回一个以开头的XML响应

软件包安装在4098ms中。
好啊

不成功的部署请求返回以开头的HTML响应


内容修改/crx/packmgr/service.jsp
内容修改/crx/packmgr/service.jsp
地位
200

我推测AEM中对服务端点的请求是成功的,但插件无法解析HTML响应。看起来6.2中的AEM正在远离/crx/packmgr/service.jsp端点,以及本文档中的XML响应

在中,有一个新版本(0.5),它的版本号比以前的版本号有了显著的飞跃,并且与AEM 6.2版本(2016年4月)一致,但我找不到任何关于如何配置新插件的文档


如果有人遇到过此问题,您是如何解决的

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

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
这将为您提供配置详细信息,例如-

[信息]Adobe内容包Maven插件0.5.1 Maven插件 支持创建内容包并控制包 远程系统上的管理器

内容包:在远程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

com.day.jcr.vault
内容包maven插件
安装软件包
安装
0.0.24
真的
真的
${crx.username}
${crx.password}

我的多模块项目也遇到了同样的问题:

  • 单元1:简单内容
  • 模块2:简单内容、资产和捆绑包
  • 模块3:简单内容
这些模块的软件包是按上述顺序安装的,这似乎是问题所在


事实证明,问题发生在安装第三个软件包时,在
error.log
中,某些资产工作流出现问题。我不知道确切的原因是什么,但更改包的顺序实际上是有帮助的,所以我必须做的是在最后安装带有资产的包并捆绑。你可以根据项目结构考虑一个类似的解决方案。

我知道这是一个老问题,但是我们最近遇到了这个问题。更新到内容包maven plugin的0.5.24版解决了这个问题


本地计算机上的部署配置文件工作正常,但在CI环境中失败,我将为其创建另一个故事并将其链接到此处。

以上内容应该可以解决您的问题。它修复了我的问题。我还必须将
true
添加到插件
configurations
<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>