AnsweredAssumed Answered

Filesystem Deployment Target for WCM

Question asked by jefflv on Sep 8, 2009
Latest reply on Apr 2, 2010 by bnordgren
I have added a new Tomcat server to the development box running my Alfresco v3.2 server. I would like to have a deployment target that publishes my WCM website to a webapp folder in my new Tomcat. Therefore, I am trying to create a new filesystem deployment target (or modify the existing one, it doesn't matter).

I have followed the instructions at http://wiki.alfresco.com/wiki/WCM_Deployment_Engine#Targets and http://wiki.alfresco.com/wiki/File_System_Deployment_Target, but I must say, these sections leave as much as they cover, so it feels like a guessing game. (It sure would be nice to have step-by-step instructions on how to complete what should be these very simple tasks.)

When I publish, the content goes to the filesystem, but it keeps putting it into a ROOT folder, which is not what I desire. I want to put the content into $tomcat/webapps/$project. However, every time I publish, my content get put into $tomcat/webapps/$project/ROOT, which is not my intention. How do I stop it adding "/ROOT" to my publish location?

Can anyone help? Below are my configuration files and deployment settings.

Thanks,
Jeff



/opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/deployment/jeff-target.xml
==================================================================================

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<!–  Built in deployment server target –>

<beans>

     <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="ignoreUnresolvablePlaceholders">
            <value>true</value>
        </property>
        <property name="locations">
            <list>
                <value>classpath:alfresco/deployment/jeff.properties</value>
            </list>
        </property>
    </bean>

    <!–  This is the common configuration for all file system receivers –>
    <bean id="fileSystemReceiverService" class="org.alfresco.deployment.impl.fsr.FileSystemReceiverServiceImpl"
          init-method="init">

        <!– Will an error be thrown if the FSR overwrites files outside its control –>
        <property name="errorOnOverwrite"><value>${deployment.filesystem.errorOnOverwrite}</value></property>

        <!–  Where to store temporary data –>
        <property name="dataDirectory">
            <value>${deployment.filesystem.datadir}</value>
        </property>

        <!–  Where to log information –>
        <property name="logDirectory">
            <value>${deployment.filesystem.logdir}</value>
        </property>



        <property name="commandQueue"><ref bean="deploymentReceiverCommandQueue" /></property>
    </bean>

        <!–

        Defines and registers the deployment target with the name "default"
        Which is a FileSystemDeploymentTarget with the "deploymentReceiverEngine"
        –>

        <bean class="org.alfresco.deployment.impl.server.DeploymentTargetRegistrationBean"
                init-method="register" >

                <property name="name"><value>${deployment.filesystem.default.name}</value></property>
                <property name="registry"><ref bean="deploymentReceiverEngine" /></property>

                <property name="target">
                    <bean class="org.alfresco.deployment.impl.fsr.FileSystemDeploymentTarget" init-method="init">
                            <property name="rootDirectory"><value>${deployment.filesystem.default.rootdir}</value></property>

                         <!–  where to store meta data –>
                                        <property name="metaDataDirectory">
                                        <value>${deployment.filesystem.default.metadatadir}</value>
                                        </property>

                        <property name="autoFix"><value>${deployment.filesystem.autofix}</value></property>
                        <property name="fileSystemReceiverService"><ref bean="fileSystemReceiverService"/></property>

                        <!–  how to authenticate for this particular target –>
                                                <property name="authenticator">
                                                <bean class="org.alfresco.repo.deploy.DeploymentReceiverAuthenticatorAuthenticationService"
                                                        init-method="init">
                                                        <property name="authenticationService">
                                                                <ref bean="AuthenticationService" />
                                                        </property>
                                                </bean>
                                                </property>

                                        <!– Target Event Handlers
                                        <property name="prepare">
                                <list>
                                                        <bean class="org.alfresco.deployment.SampleRunnable"/>
                                </list>
                        </property>

                        <property name="postCommit">
                                <list>
                                                        <bean class="org.alfresco.deployment.SampleRunnable"/>
                                </list>
                        </property>
                                        –>
            </bean>
       </property>
   </bean>

</beans>


/opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/deployment/jeff.properties
==================================================================================

; Built in deployment receiver properties for the default
; filesystem receiver

; filesystem receiver configuration
deployment.filesystem.rootdir=./wcm-prod
deployment.filesystem.datadir=${deployment.filesystem.rootdir}/depdata
deployment.filesystem.logdir=${deployment.filesystem.rootdir}/deplog
deployment.filesystem.metadatadir=${deployment.filesystem.rootdir}/depmetadata

deployment.filesystem.autofix=true
deployment.filesystem.errorOnOverwrite=false

; default filesystem target configuration
deployment.filesystem.default.rootdir=/opt/prod-tomcat/webapps/internal
deployment.filesystem.default.name=internalweb
deployment.filesystem.default.metadatadir=${deployment.filesystem.metadatadir}/default


Deployment Receiver
========================

Type: Live Server
Display Name: Development Tomcat
Display Group:
Transport Name: default
Host: locatlhost
Port: 50500
URL: http://192.168.168.29:8081/internalweb
Username: admin
Password: <password>
Source Path:
Excludes:
Target Name: internalweb

Outcomes