-
Notifications
You must be signed in to change notification settings - Fork 1
Content space
The LiveCycle-Maven plugin is also capable of copying content in a LiveCycle Content Space.
The plugin recursively copies the content of the source server content space to the destination server content space, and creates the content spaces along the way as needed.
A LiveCycle content space can be copied with the copy-contentspace goal:
mvn livecycle:copy-contentspace
The corresponding Maven pom.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>be.idamediafoundry.sofa.livecycle.maven</groupId>
<artifactId>copy-content-space-example</artifactId>
<packaging>pom</packaging>
<name>Copy Content Space example</name>
<build>
<plugins>
<plugin>
<groupId>be.idamediafoundry.sofa.livecycle</groupId>
<artifactId>livecycle-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<host>hostname</host>
<port>8080</port>
<protocol>SOAP</protocol>
<username>administrator</username>
<password>password</password>
<sourceHost>hostname2</sourceHost>
<sourcePort>8080</sourcePort>
<sourceProtocol>SOAP</sourceProtocol>
<sourceUsername>administrator</sourceUsername>
<sourcePassword>password</sourcePassword>
<contentSpacePath>/Company Home/Project/Space</contentSpacePath>
</configuration>
</plugin>
</plugins>
</build>
</project>
We define the source server to copy content from, and also supply the path in the content space that needs to be copied, and the livecycle-maven-plugin will copy over all the files. This mojo will not overwrite any existing content, unless the overwrite configuration parameter is set to true.
This feature especially plays nice with the usage of Maven profiles, as that for instance allows you to define several profiles that copy content between the content spaces of several servers, instead of doing a manual export in the LivCycle Content Space administration console, and a manual import in the administration console of the target server.