Adding the JCR-RMI Extension to the Alfresco Web Client Build

Document created by resplin Employee on Jun 6, 2015
Version 1Show Document
  • View in full screen mode

{{Obsolete}}

This functionality was removed from Alfresco in 5.0.b.

To my knowledge (which extends to questions Ive asked in the forum), The extensibility of the Alfresco build harness exists within the project and somewhat breaks down at the upper layers. If I am correct (which, I am usually not :/ ) expect to update the following files when ever you update your entire alfresco checkout.  If I find out differently I will promptly update this documentation with glee.


common/build.xml


Make the following edits to the common/build.xml to enter the JCR library and the RMI-JCR extension in to the build process.





  <property name='dir.common' value='${basedir}' />
  <import file='${dir.common}/common-init.xml' />

  <target name='init' depends='common-init.init'>
     .
     .
     .
    
     <filelist id='files.project.build' dir='${dir.product.root}'
               files='.
                      .
                      .
Insert the following two lines after the repository build:
                 ${dir.name.projects}/${dir.name.jcr}/${file.name.project.build}
                 ${dir.name.projects}/extension-jcr-rmi/${file.name.project.build}
                      .
                      .
                      .
                      '/>
  </target>

webclient/project-build.xml


Make the following changes to the webclients project-build.xml to facilitate the packaging of the JCR library and the RMI-JCR library with the alfresco webclient disrobution (alfresco.war)

  <target name='assemble-war-common'>
     .
     .
     .     
     <copy todir='${dir.assemble}/WEB-INF/lib'>
       <fileset dir='${dir.project.jcr}/build/dist' includes='alfresco-jcr.jar' />
       <fileset dir='${dir.projects}/extension-jcr-rmi/build/dist' includes='extension-jcr-rmi.jar' />
     </copy>
    
     <copy todir='${dir.assemble}/WEB-INF/classes'>
        .
        .
        <fileset dir='${dir.project.jcr}/config' />
        <fileset dir='${dir.projects}/extension-jcr-rmi/config'  />
     </copy>
     .
     .
     .
     <copy todir='${dir.assemble}'>
       <fileset dir='${dir.projects}/extension-jcr-rmi/source/web' includes='**/*.*' />
     </copy>
  </target>

jcr-context.xml


in the alfresco-jcr project config/alfresco folder you will find a file called jcr-context.xml
This is a spring configuration file. At the very top you fill find an import tag for application-context.xml, remove it.
I don't know why this import is here but it causes circular imports when spring is trying to load in the context of the web application

Attachments

    Outcomes