wttech/CQ-Unix-Toolkit

Package Manager API replacement

jwadolowski opened this issue · 1 comments

At the time of writing all commands use old, XML-based Package Manager API located at /crx/packmgr/service.jsp.

Most recent AEM versions still support that API, but it's no longer documented.

In most cases it works just fine, but I recently encountered a few issues, which boil down to limitations of that API:

  • cqbld doesn't seem to work well if more than 1 version of given package exists
  • cqrun doesn't accept package version (in most cases the most recent will be installed)
  • cqdel removes the oldest package if more than 1 version exists
  • ...

The list is definitely not complete, but those issue affect my work most frequently.

Each Package Manager operation has JSON-based API equivalent:

  • cqls - use /crx/packmgr/list.jsp instead
  • cqbld - POST /crx/packmgr/service/script.html/etc/packages/<GROUP>/<NAME>-<VERSION>.zip does the trick these days
  • ...