Note: Please make sure to install Prerequisites on the system.
Make sure you have the forge Maven2 repository reference in the root pom.xml of your project.
<repositories> <!-- SNIP --> <repository> <id>bloomreach-maven2-forge</id> <name>Bloomreach Maven 2 Forge Repository</name> <url>https://maven.bloomreach.com/repository/maven2-forge/</url> </repository> <!-- SNIP --> </repositories>
Make sure you have dependency definition in the root pom.xml of your project.
<dependencyManagement> <!-- SNIP --> <dependencies> <!-- SNIP --> <!-- NOTE: You should set a property named 'forge.gallery-magick.version' to a version of this plugin! --> <!-- gallery-magick-bootstrap module registers a new Gallery Processor with ID, "service.magick.command.gallery.processor", in Repository. --> <dependency> <groupId>org.onehippo.forge.gallery-magick</groupId> <artifactId>gallery-magick-bootstrap</artifactId> <version>${forge.gallery-magick.version}</version> </dependency> <!-- gallery-magick-cms contains CMS Plugin components. --> <dependency> <groupId>org.onehippo.forge.gallery-magick</groupId> <artifactId>gallery-magick-cms</artifactId> <version>${forge.gallery-magick.version}</version> </dependency> <!-- SNIP --> </dependencies> <!-- SNIP --> </dependencyManagement>
Add the following dependencies to either cms-dependencies/pom.xml
in brXM v13 and higher
or cms/pom.xml
in the earlier versions.
<dependencies> <!-- SNIP --> <dependency> <groupId>org.onehippo.forge.gallery-magick</groupId> <artifactId>gallery-magick-bootstrap</artifactId> </dependency> <dependency> <groupId>org.onehippo.forge.gallery-magick</groupId> <artifactId>gallery-magick-cms</artifactId> </dependency> <!-- SNIP --> </dependencies>
gallery-magick-bootstrap module registers a new Gallery Processor with ID,
service.magick.command.gallery.processor
, in your repository.
It doesn't replace the default Gallery Processor (ID: service.gallery.processor
).
Because this bootstrap module doesn't change any Gallery Processor reference configurations automatically,
it would not make any changes on your system yet.
To replace all the Gallery Processor reference configurations in your system,
you should include more configuration data items in your project
as explained in the next section.
There are several Gallery Processor reference configurations in the repository. Here is the list:
/hippo:configuration/hippo:workflows/gallery/image-gallery/frontend:renderer/gallery.processor.id
/hippo:namespaces/hippogallery/image/editor:templates/_default_/upload/gallery.processor.id
/hippo:namespaces/hippogallery/image/editor:templates/_default_/crop/gallery.processor.id
/hippo:namespaces/hippogallery/image/editor:templates/_default_/regenerate/gallery.processor.id
All of those listed above are pointing to JCR properties which are set to the default Gallery Processor ID,
service.gallery.processor
.
Now, in order to use the Magick Command Gallery Processor instead of the default Gallery Processor component,
you need to simply replace those property values by service.magick.command.gallery.processor
. That is,
/hippo:configuration/hippo:workflows/gallery/image-gallery/frontend:renderer/@gallery.processor.id = "service.magick.command.gallery.processor"
/hippo:namespaces/hippogallery/image/editor:templates/_default_/upload/@gallery.processor.id = "service.magick.command.gallery.processor"
/hippo:namespaces/hippogallery/image/editor:templates/_default_/crop/@gallery.processor.id = "service.magick.command.gallery.processor"
/hippo:namespaces/hippogallery/image/editor:templates/_default_/regenerate/@gallery.processor.id = "service.magick.command.gallery.processor"
Now, you're ready to use the plugin!