-
Notifications
You must be signed in to change notification settings - Fork 1
Usage
The LiveCycle Maven Plugin consists of the prior mentioned 6 Maven Mojos.
The available commands are:
| Mojo | Goal / command | Description |
|---|---|---|
| Deploy DSC Mojo | ||
| deploy-dsc | Deploys the dsc file to the configured server | |
| Deploy LCA Mojo | ||
| deploy-lca | Deploys the lca file to the configured server | |
| Configuration Mojo | ||
| configure | Configures services on the configured server | |
| Copy Content Space Mojo | ||
| copy-contentspace | Recursively copies the content of the source server content space to the destination server content space, creating the spaces as needed. Standard behavior of the mojo is to NOT overwrite any existing content. | |
| Ping Mojo | ||
| ping | Fails the build if the server cannot be contacted. This mojo can be used to fail the build early on, when the LiveCycle server is unreachable. | |
| Generate Component Xml Mojo | ||
| generate-component-xml | Generates a component XML file from java source code |
A LiveCycle application (lca file) can be deployed with the deploy-lca goal:
mvn livecycle:deploy-lca
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>lca-deployment-example</artifactId>
<packaging>pom</packaging>
<name>LCA deployment example</name>
<version>1</version>
<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>
</configuration>
</plugin>
</plugins>
</build>
</project>
The full example can be found at the LiveCycle Application Deployment page
A LiveCycle custom component (dsc file) can be deployed with the deploy-dsc goal:
mvn livecycle:deploy-dsc
The plugin will use the configured server information and dsc location to do the deploy.
Configuration:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
...
<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>
<dscFile>${project.build.directory}/dsc.jar</dscFile>
</configuration>
</plugin>
</plugins>
</build>
</project>The full example can be found at the DSC Custom Component page
Another important feature of the LiveCycle Maven Plugin is the ability to configure the configuration parameters of a LiveCycle application or a custom component.
This feature gives the possibility to also have a scripted configuration phase as part of your deployment, instead of needing to go through the configuration wizards in the LiveCycle AdminUI.
This ability to configure programmatically will especially show to be useful when it's being combined with Maven profiles (see further on). This allows to have an application or custom component with a set of configuration files, allowing you for instance to deploy on your Development, Acceptance and Production environments, with the right configuration applied after deployment.
The LiveCycle Maven Plugin uses a seperate xml file to specify the configuration parameters. This configuration file is refered to in the pom.xml file.
Configuring a LiveCycle application or custom component is thus a 3-step process:
- make a configuration file
- refer to the wanted configuration file in your pom.xml
- use the configure goal of the plugin
Configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="http://www.ida-mediafoundry.be/livecycle/configuration" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<service name="MyApplication/Processes/Utils/ErrorHandler" >
<configuration>
<property name="confEnvironment" value="ACCEPTANCE"/>
<property name="confAdminAddress" value="acc@example.com"/>
</configuration>
</service>
<service name="MyApplication/Processes/RenderLicence" >
<configuration>
<property name="confTargetURL" value="http://www.example.com/MyApplication/Processes/RenderLicence:1.1"/>
</configuration>
</service>
</config>Refer to the configuration 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">
...
<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>
<configurationFile>${basedir}/src/main/lc/acc-config.xml</configurationFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
Use the configure goal
mvn livecycle:configure
The full example can be found at the Configuration page
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>
The full example can be found at the Content space page
This Maven plugin supports the usage of Maven Profiles ( see also: Maven: The Complete Reference book )
This allows you to:
- deploy to different servers according to the selected Maven profile
- configure a LiveCycle application or custom component according to the selected Maven profile
All dependencies for the LiveCycle Maven Plugin can be found in the central Maven Repo, except for the Adobe LiveCycle libraries. These can not be redistributed, and as such you will need to deploy them in your own Maven repository.
The following table lists the JAR files that are required to use this plugin, and that thus need to be deployed as LiveCycle dependencies:
| groupId | artifactId | version | File | Location |
|---|---|---|---|---|
| com.adobe.livecycle | livecycle-client | 9.0 | adobe-livecycle-client.jar | *install directory*/Adobe/Adobe LiveCycle ES2.5/LiveCycle_ES_SDK/client-libs/common |
| com.adobe.livecycle | usermanager-client | 9.0 | adobe-usermanager-client.jar | *install directory*/Adobe/Adobe LiveCycle ES2.5/LiveCycle_ES_SDK/client-libs/common |
| com.adobe.livecycle | applicationmanager-client | 9.0 | adobe-applicationmanager-client-sdk.jar | *install directory*/Adobe/Adobe LiveCycle ES2.5/LiveCycle_ES_SDK/client-libs/common |
| com.adobe.livecycle | contentservices-client | 9.0 | adobe-contentservices-client.jar | *install directory*/Adobe/Adobe LiveCycle ES2.5/LiveCycle_ES_SDK/client-libs/common |
Be sure to check the example pages for the different mojos:
- Application Deployment
- Custom Component Deployment
- Auto Generation of component.xml
- Configuration
- Copy Content Space
- Profiles - deploy to different environments
- Dependencies
You can also build the site for this project to learn more about the different mojos.
mvn site