Make sure you have the forge Maven2 repository reference and dependency definition in the root pom.xml of your project.
<repositories>
<!-- SNIP -->
<repository>
<id>hippo-maven2-forge</id>
<name>Hippo Maven 2 Forge repository</name>
<url>http://maven.onehippo.com/maven2-forge/</url>
<snapshots />
</repository>
<!-- SNIP -->
</repositories>
<!-- SNIP -->
<dependencyManagement>
<!-- SNIP -->
<dependencies>
<!-- SNIP -->
<!-- NOTE: You should set a property named 'bloomreach.forge.doc-commenting.version' to a version of this plugin! -->
<dependency>
<groupId>org.bloomreach.forge.doc-commenting</groupId>
<artifactId>doc-commenting-repository</artifactId>
<version>${bloomreach.forge.doc-commenting.version}</version>
</dependency>
<dependency>
<groupId>org.bloomreach.forge.doc-commenting</groupId>
<artifactId>doc-commenting-cms</artifactId>
<version>${bloomreach.forge.doc-commenting.version}</version>
</dependency>
<!-- SNIP -->
</dependencies>
<!-- SNIP -->
</dependencyManagement>
Add the following dependencies to either cms-dependencies/pom.xml in Bloomreach XM 13
or in cms/pom.xml in the earlier versions.
<dependencies>
<!-- SNIP -->
<dependency>
<groupId>org.bloomreach.forge.doc-commenting</groupId>
<artifactId>doc-commenting-repository</artifactId>
</dependency>
<dependency>
<groupId>org.bloomreach.forge.doc-commenting</groupId>
<artifactId>doc-commenting-cms</artifactId>
</dependency>
<!-- SNIP -->
</dependencies>
Note: before version 5.0.0, the artifacts' groupId was org.onehippo.forge.doc-commenting
Now, you're ready to use the plugin!
/hippo:configuration/hippo:domains/doccommenting
is bootstrapped by the plugin itself (doc-commenting-repository.jar). When upgrading towards 14, best approach
is to first remove this node from project yamls, then redo any changes.
This plugin stores comment data in JCR node structure by default (using DefaultJcrCommentPersistenceManager).
The default CommentPersistenceManager requires the user to be able to write
doccommenting-commentdatacontainer and doccommenting:commentdata nodes
under /doccommentdata node.
Therefore, you should add Hippo Security Domain configurations under /hippo:configuration/hippo:domains/
like the following (in yaml format), in order to allow users in both 'author' and 'editor'
groups to be able to read/write the comment data nodes, for instance:
/hippo:configuration/hippo:domains/doccommenting:
jcr:primaryType: hipposys:domain
/commentdata-nodes:
jcr:primaryType: hipposys:domainrule
/doccommenting-commentdata:
jcr:primaryType: hipposys:facetrule
hipposys:equals: true
hipposys:facet: jcr:primaryType
hipposys:filter: false
hipposys:type: Name
hipposys:value: doccommenting:commentdata
/commentdatacontainer-nodes:
jcr:primaryType: hipposys:domainrule
/doccommenting-commentdatacontainer:
jcr:primaryType: hipposys:facetrule
hipposys:equals: true
hipposys:facet: jcr:primaryType
hipposys:filter: false
hipposys:type: Name
hipposys:value: doccommenting:commentdatacontainer
/editor-readwrite:
jcr:primaryType: hipposys:authrole
hipposys:groups: [editor, author]
hipposys:role: readwrite