cancel
Showing results for 
Search instead for 
Did you mean: 

Filesystem Deployment Target for WCM

jefflv
Champ in-the-making
Champ in-the-making
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
12 REPLIES 12

mrogers
Star Contributor
Star Contributor
In the web project definition you can configure the "WebApp",  you have gone with the default value which is ROOT.

So point it at $tomcat/webapps and change the web app setting.

jefflv
Champ in-the-making
Champ in-the-making
What does "point it at" mean? Can you please be specific?

I created a new WebApp folder called "internalweb" and selected that value in the drop-down list above my Staging Sandbox. (This is my interpretation of "point it at".) I made no changes to neither target configuration nor Deployment Descriptor.

When I re-deploy, data continues be published to $tomcat/$project/ROOT, even after having restarted alfresco. As far as I can tell, the webapp folder is completely ignored by Alfresco.

Ideas?

Jeff

jefflv
Champ in-the-making
Champ in-the-making
….sooooooo…….no ideas?

As far as I can tell the webapp feature of WCM is nearly undocumented. Yes, it appears on a few wiki pages but I cannot find any documentation on how to use it.

Jeff

ilmartin
Champ in-the-making
Champ in-the-making
Jeff, have you found a solution?. I'm trying to configure it and I have the same problem.

Thanks and regards, Iván.

kamal_ravichand
Champ in-the-making
Champ in-the-making
Hi Jeff,

Here are the steps you needed :

1) Browse to your web project(companyhome > webprojects > testsite)

2) Click on actions button and click on  "Create web App folder", say 'test'

3) After creating a web app folder again click on actions and click on "edit webproject settings"

4) In the first step of edit web project settings screen you can find a drop down asking for "Default Web app". choose "test" as default webapp

5) Done!! now when you deploy your project a test folder will be created in webapps of your tomcat server or you create a folder named "test" in webapps

NOTE: the content already present in ROOT web app wont be available in test webapp. The above said steps are recommended to follow before you start creating content in your web project

GOOD LUCK  Smiley Happy

murali
Champ in-the-making
Champ in-the-making
Hi
i am new for Alfresco.

Any one tell me how to change deployement folder instead of ROOT folder. i was tried but i am not getting my webapp files.

How to get Created WebApp files. Both servers are runnng in machine only.

Regards,
P.Murali.

mrogers
Star Contributor
Star Contributor
There's two settings you may set.   

The first is on the alfresco authoring side where you can select the sourcePath in the deployment receiver configuration.   You may want to set sourcePath to "ROOT" if you don't want ROOT webapp to be part of the path.   Which means deploy all files/folders below ROOT.   

The second setting is on the receiving side where you specify where you want the deployment to go.

murali
Champ in-the-making
Champ in-the-making
Hi,

i want to deploye my webapp into tomcat/webapps/"mywebapps" .

how can i set deployemnt receiver .

regards,
P.Murali.

mrogers
Star Contributor
Star Contributor
Set the root directory property of your target definition.