Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/openweb-nl/hippo-groovy-updater
This project is designed for Hippo developers to have an easy way to create updaters in groovy, without being bothered with the bootstrap yaml.
https://github.com/openweb-nl/hippo-groovy-updater
bootstrap groovy groovy-scripts hippo hippo-cms
Last synced: about 1 month ago
JSON representation
This project is designed for Hippo developers to have an easy way to create updaters in groovy, without being bothered with the bootstrap yaml.
- Host: GitHub
- URL: https://github.com/openweb-nl/hippo-groovy-updater
- Owner: openweb-nl
- License: apache-2.0
- Created: 2017-09-11T18:22:23.000Z (about 7 years ago)
- Default Branch: develop
- Last Pushed: 2023-12-13T09:22:23.000Z (11 months ago)
- Last Synced: 2024-09-28T15:05:32.158Z (about 2 months ago)
- Topics: bootstrap, groovy, groovy-scripts, hippo, hippo-cms
- Language: Java
- Homepage:
- Size: 438 KB
- Stars: 2
- Watchers: 8
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Project for Hippo Updaters Maven Plugin
This project is designed for Hippo developers to have an easy way to create updaters in groovy, without being bothered with the repository data yaml.For use the updaters are located in their own submodule. Nicely separated from other bootstrap.
They are groovy scripts, so the editor can easily provide autocomplete and stuff, configured by Annotations.The groovy scripts are by default located in:
```
/src/main/scripts
```
## Modules involved
* Groovy updater annotations
* Groovy updater bootstrap generator
* Groovy updater maven plugin
* Sample project for the maven plugin
* Synchronisation module for updater scripts## Annotation use
Minimal use for the Updater definition
```groovy
@Updater(name = "Name", xpath = "//element(*, hst:mount)")
```
Bootstrap definition is optional
```groovy
@Bootstrap(reload = true)
```
To exclude a groovy script from being bootstrapped:
```groovy
@Exclude
```
To add mixin(s) (since 1.14):
```groovy
@Updater(name = "Name", mixin = "hippo:named, mix:referenceable")
```
## Use of the maven plugin
In the build section of the (new) module containing the groovy updater scripts, define the execution of the plugin
```xml
nl.openweb.hippo.updater
groovy-updater-maven-plugin
${groovy-updater-maven-plugin.version}
default-resources
compile
generate-yaml
```#### These are the configuration keys of the plugin:
* **sourceDir**
* the source of the groovy files
```default: ${project.build.scriptSourceDirectory}```
* **targetDir**
* where to generate the bootstrap
```(default: ${project.build.outputDirectory})```
* **defaultContentRoot**
* default contentroot value _(registry/queue)_
```(default: queue)```
* **yamlContentPath** (since 1.13)
* relative path for the yaml queue bootstrap files
```(default: hcm-content/configuration/update)```
* **yamlConfigurationPath** (since 1.13)
* relative path for the yaml registry bootstrap files
```(default: hcm-config/configuration/update)```When using a separate module, don't forget to place an hcm-module.yaml in the project.
```yaml
group:
name: hippoproject
project: hippoproject
module:
name: hippoproject-repository-data-updaters
after: hippoproject-repository-data-content
```
### Commonly used dependencies for writing the groovy scripts
```xml
nl.openweb.hippo.updater
groovy-updater-annotations
${groovy-updater-maven-plugin.version}
provided
org.apache.jackrabbit
jackrabbit-core
${hippo.jackrabbit.version}
provided
```
## Updater Script Synchronisation module
> This module has copied some logic and classes from the well known webfiles module.
The updater scripts add changed groovy scripts to the updaters registry.
the module is registered at:
`/hippo:configuration/hippo:modules/groovyfiles`Add this dependency to the cms or a dependency of the cms, like a separate 'updaters' module or 'content', use this for local development only.
It is highly recommended to use a profile for it.
```xml
nl.openweb.hippo.updater
groovy-updater-sync
${groovy-updater-maven-plugin.version}
```
By default the updater-sync plugin watches a module named 'updater', to use a different module as source for the scripts,
set the system property `groovy.sync.watchedModules` in the cargo container.
```xml
org.codehaus.cargo
cargo-maven2-plugin
...
...
...
updater
```
### Log4j2
Add an info logging level for nl.openweb.hippo.groovy to your development log4j configuration
```xml
```