Giter Club home page Giter Club logo

vault-upgrade-hook's Introduction

Vault Upgrade Hook

AEM/Jackrabbit content packages allow to place Jars to a package in META-INF/vault/hooks that will be executed during installation. These hooks have to implement the interface InstallHook.

InstallHooks are executed for each install phase: PREPARE, INSTALLED and END. If an error occurs FAILED is called for PREPARE or INSTALLED. END is called if installation was successful.

Instead of implementing and creating new Java.jars with every job, Vault-Upgrade-Hooks aims to allow to run Groovy Scripts developed and tested using the CQ Groovy Console [https://github.com/Citytechinc/cq-groovy-console].

Features

  • Run Groovy Console Scripts places w/in the package files
  • Control if the upgrade is executed by Package and install version.
  • Control if the upgrade is executed once or with every install of an package

Usage

Two general ways of how to use it:

  1. ad-hoc admin style:
  • take a copy of the sample package (sling pipes or groovy)
  • update package info (make sure name, version and group are updated),
  • update hook (e.g. test-groovy - replace all scripts with yours, update the run-info (run,version,jcr:title))
  • build and install
  1. dev-style:
  • add a copy job to your maven build (resource plugin) and place the hook.jar
  • create a upgrade info folder (like the test-groovy one) and place your scripts in -> part of your deployment process

Run mvn clean install -PautoInstallPackage

More information

Stores

Run information is stored in Phase END under:

/var/upgrade/packagegroup/packagename

Interface implementation AEM6.0 and AEM6.1+

The hook requires AEM6 SP3. If you need to run this with an earlier version replace org.apache.jackrabbit.vault.packaging.InstallHook by om.day.jcr.vault.packaging.InstallHook

vault-upgrade-hook's People

Contributors

cpilsworth avatar

Watchers

Konrad Windszus avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.