Package Manager

/bin/packages.html

The Composum Package Manager adds a user interface to the Apache Jackrabbit Vault and makes is easy to import, export and manage Vault packages containing collections of content nodes.

Packages

The Package Manager for Apache Sling is a Composum Console Module which provides a user interface for the Jackrabbit Vault Bundle which handles Content Packages. The Jackrabbit Vault Bundle must be installed and activated to use the Composum Package Manager console. If the Vault bundle is not available the Package Manager is not visible in the Composum Console Main Menu.

Package Browser

The first view displays the available packages arranged on the left side as a tree according to the package groups (the API doesn't know a group hierarchy but it's possible to arrange the packages similar to the nodes browser). The view is structured as known from the Browser view. On the right side a query panel is visible on top and below the details panel.

The details view contains a list of packages if a group is selected in the tree; if a package is selected then the package status with all package actions and two additional 'tabs' - the filter manipulation view and the coverage view - is shown.

The package details view of the package manager

Actions

available actions:

  • edit the basic package properties
  • download the package ZIP file
  • install / reinstall the package
  • build / rebuild the package ZIP file from current content
  • uninstall the package by reinstalling the snapshot of the last 'install'
  • delete the package (no implicit unistall before)
  • add / create a new package
  • upload a package
  • refresh the current view

Install a package

If you click install the package content will be copied to the repository according to the filter rules declared for the package. On each 'install' a snapshot of the content affected by the package is created and stored in the context ot the package; this snapshot is used to reset the content if the package is uninstalled.

Build the package

On each build the current content in the repository which is appropriate to the filter configuraten of the package is stored in the packages ZIP file and can be downloaded or reinstalled if the build is done.

Unistall the package

If the package was installed and a snapshot with the content state before this install the package can be uninstalled; in this case the content of the snapshot is installed and replaces the content of the package.

Delete the package

A click to 'delete' removes the package definition, the ZIP file of the package and a probably existing snapshot from the repository; the package is not uninstalled before the removal.

Filters

The second tab in the package view presents the package filter definitions in a table. You can add, change and remove filter definitions in this view using the action buttons in the toolbar of this filter view.

You can also change the ordering of the filters in this table.

Each filter in this list declares the rules for one piece of the package content.

A filter must be determined at least by its root path. Without the optional include and/or exclude patterns the hohle content of the root will be part of the package.

You can add regular expressions for the content paths to include nodes explicitly (and exclude the others implicitly) or to exclude nodes from the package content.

The filter view

Create or deploy a package

You can create a package from scratch using th action button '+' in the tree view of the Package Manager.

Currently only the main attributes of a package (group, name and version) are editable - special things such as ACL handling, dependencies, ... will be added in one of the next releases.

If you already have a package file then you can upload it and than modify or install the package.

Another way to create a package ist the deployment via HTTP request. A request like

curl -u admin:admin -F file=@my-package-1.0.0.zip http://localhost:8080/bin/cpm/package.service.html

uploads a package file and installs it. This can be used in an Maven build configuration like this, which is using the Content Package Maven Plugin provided by Adobe for the AEM platform:

<build> <pluginManagement> <plugins> <plugin> <groupId>com.day.jcr.vault</groupId> <artifactId>content-package-maven-plugin</artifactId> <version>0.0.24</version> <extensions>true</extensions> <configuration> <failOnError>true</failOnError> <targetURL>http://${sling.host}:${sling.port}${sling.context}/bin/cpm/package.service.html</targetURL> <userId>${sling.user}</userId> <password>${sling.password}</password> <useProxy>false</useProxy> <failOnMissingEmbed>true</failOnMissingEmbed> </configuration> </plugin> </plugins> </pluginManagement> </build>