This is a plugin designed for Maven 2.x+ based builds to automate content checkout process. It allows to set up content checkout, and remove some unnecessary properties from .content.xml files.
- downloads content(using vlt) from CQ/AEM instance
- removes .vlt files
- removes properties from .content.xml files
- Maven 2.x, 3.x
Checkout the source code:
cd [folder of your choice]
git clone git://github.com/Cognifide/Maven-Vault-Checkout-Plugin.git
cd Maven-Vault-Checkout-Plugin
Compile and install:
mvn clean install
Set up POM file:
(...)
<plugin>
<groupId>com.cognifide.maven.plugins</groupId>
<artifactId>vltco-maven-plugin</artifactId>
<version>0.2.0</version>
<configuration>
<uri>http://localhost:4503</uri>
<user>author</user>
<password>author</password>
<localPath>src/main/content/jcr_root</localPath>
<filter>src/main/content/jcr_root</filter>
<!-- custom content properties that will be removed from .content.xml during clean goal -->
<contentProperties>
<contentProperty>my:contentProperty</contentProperty>
</contentProperties>
</configuration>
</plugin>
(...)
Now you can invoke one of the Maven Vault Checkout Plugin goals:
-
to checkout content from instance use
mvn vltco:checkout
-
to remove .vlt files and cleans content.xml from unnecessary properties use (default properties are: jcr:uuid, jcr:lastModified, jcr:lastModifiedBy, jcr:created, jcr:createdBy, cq:lastModified, cq:lastModifiedBy, cq:lastReplicated, cq:lastReplicatedBy, cq:lastReplicationAction, cq:lastReplicationStatus)
mvn vltco:clean
-
to checkout and remove .vlt files and cleans content.xml from unnecessary properties use
mvn vltco:clean-checkout
Maven Vault Checkout Plugin can be configured using element (see Usage sample above) with following tags:
Parameter name | Default value | Description |
---|---|---|
uri | http://localhost:4502 | instance uri |
user | admin | user name |
password | admin | user password |
localPath | src/main/aem/jcr_root | directory for the content to be stored in |
filter | src/main/aem/META-INF/vault/filter.xml | filter file location |
contentProperties | jcr:uuid, jcr:lastModified, jcr:lastModifiedBy, jcr:created, jcr:createdBy, cq:lastModified, cq:lastModifiedBy, cq:lastReplicated, cq:lastReplicatedBy, cq:lastReplicationAction, cq:lastReplicationStatus | list of properties that will be remove from .content.xml files during clean goal |
Technical support can be made available if needed. Please contact us for more details.
We can:
- prioritize your feature request,
- tailor the product to your needs,
- provide a training for your engineers,
- support your development teams.