2.2.4.26. WCM Publication Deployment

This plugin is used to inject content at the server startup. Being considered as a substitute for the deprecated XMLDeploymentPlugin, it is better because it allows both injection and publication to be done at once.

In configuration, plug it to the following target component:


<target-component>org.exoplatform.services.deployment.WCMContentInitializerService</target-component>

Sample configuration:


<external-component-plugins>
    <target-component>org.exoplatform.services.deployment.WCMContentInitializerService</target-component>
    <component-plugin>
        <name>Content Initializer Service</name>
        <set-method>addPlugin</set-method>
        <type>org.exoplatform.services.wcm.extensions.deployment.WCMPublicationDeploymentPlugin</type>
        <description>WCM Plublication Deployment Plugin</description>
        <init-params>
            <value-param>
                <name>override</name>
                <description>The flag parameter to decide if portal metadata is overriden on restarting server</description>
                <value>${acme.portalConfig.metadata.override:false}</value>
            </value-param>
            <object-param>
                <name>ACME French translations directory</name>
                <description>Deployment Descriptor</description>
                <object type="org.exoplatform.services.wcm.extensions.deployment.WCMPublicationDeploymentDescriptor">
                    <field name="target">
                        <object type="org.exoplatform.services.deployment.DeploymentDescriptor$Target">
                            <field name="workspace"><string>collaboration</string></field>
                            <field name="nodePath"><string>/sites/acme/web contents/site artifacts</string></field>
                        </object>
                    </field>
                    <field name="sourcePath">
                        <string>war:/conf/acme-portal/wcm/artifacts/site-resources/acme/FrenchTranslations.xml</string>
                    </field>
                    <field name="cleanupPublicationType">
                        <string>publish-first-publication</string>
                    </field>
                </object>
            </object-param>
        </init-params>
    </component-plugin>
</external-component-plugins>

In which:

Param nameTypeValueDescription
overridebooleantrue or false
  • true: Always re-import the data from the configuration when the server restarts.

  • false: Do not re-import, so if the data has been modified after being imported for the first time, the modification is not overridden when the server restarts.

FieldTypeValueDescription
targetObjectorg.exoplatform.services.deployment.DeploymentDescriptor$TargetThe target node to import.
sourcePathStringwar:/conf/acme-portal/wcm/artifacts/site-resources/acme/FrenchTranslations.xmlThe xml descriptor file of the imported data.
cleanupPublicationTypeStringpublish-first-publication (see all the options in Description column)
  • clean-publication: import, then clean all the publication state and version history (if any).

  • keep-publication: import and keep the publication state and version history.

  • publish-first-publication: import, clean all the publication state and version history, then publish the data as the first version.

FieldTypeValueDescription
workspaceStringcollaborationThe target workspace to import.
nodePathString/sites/acme/web contents/site artifactsThe target node to import.
Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus