3 Replies Latest reply on Mar 9, 2012 2:38 PM by rhauch

    Sequencing of new content added through SVN connector

    mkmichem

      Hi guys,

       

      I have been attempting to get SVN commits to be sequenced by JCR.

      The XmlSequencerIntegrationTest only seems to test files published directly to the node-graph structure (via the API).

       

      Does modeshape support sequencing of content sourced from SVN ?

      Or am I missing an essential configuration setting somewhere ?

       

      Synopsis:

       

      Using Modeshape 2.7.0-FINAL.

       

      If I use a simple JpaSource sequencing works out fine.

      However, when I attempt the very same sequencing using SVN, it fails.

       

      Here is my sequencer:

       

      <mode:sequencers>
              <mode:sequencer jcr:name="XML File Sequencer" mode:classname="org.modeshape.sequencer.xml.XmlSequencer">
                  <mode:description>Sequences XML files loaded under '/files', extracting the contents into the equivalent JCR graph structure.</mode:description>    
                  <mode:pathExpression>//(*.(xml)[*])/jcr:content[@jcr:data] => /sequenced/xml/$1</mode:pathExpression>
              </mode:sequencer>   
      </mode:sequencers>
      

       

      And here is my source configuration:

       

      <mode:sources jcr:primaryType="nt:unstructured">
        <mode:source jcr:name="test-data"
           mode:classname="org.modeshape.connector.svn.SvnRepositorySource"
           mode:description="14592 The ModeShape SVN repository (anonymous access)"
           mode:repositoryRootUrl="http://apollo.tatis.com/repos/TEST"
           mode:username="michael" mode:password="michael"
           mode:creatingWorkspacesAllowed="true"
           mode:autoGenerateSchema="update"
           mode:referentialIntegrityEnforced="true"
           mode:largeValueSizeInBytes="10000"
           mode:retryLimit="3" 
           mode:compressData="false"
           mode:defaultWorkspaceName="trunk" />
      
      
        <mode:predefinedWorkspaceNames>tags</mode:predefinedWorkspaceNames>
        <mode:predefinedWorkspaceNames>trunk</mode:predefinedWorkspaceNames>
      </mode:sources>
      

       

      And then my repository:

       

      
      
      
      
      <mode:repositories>
       <mode:repository jcr:name="test-data-repository">
        <mode:source>test-data</mode:source>
        <mode:nodeTypes jcr:primaryType="mode:nodeTypes" />
        <namespaces jcr:primaryType="mode:namespaces" />
        <mode:options jcr:primaryType="options">
          <mode:option jcr:name="projectNodeTypes" mode:value="true"/>
          <mode:option jcr:name="jaasLoginConfigName" mode:value="modeshape"/>
          <mode:option jcr:name="systemSourceName" mode:value="system@store"/>
          <mode:option jcr:name="queryIndexDirectory" mode:value="${jboss.server.data.dir}/modeshape/repositories/store/indexes"/>                        <mode:option jcr:name="queryIndexesRebuiltSynchronously" mode:value="true"/>
          <mode:option jcr:name="rebuildQueryIndexOnStartup" mode:value="ifMissing"/>
        </mode:options> 
        <jcr:nodeTypes>
         <mode:resource>/org/modeshape/sequencer/xml/xml.cnd</mode:resource>
        </jcr:nodeTypes> 
       </mode:repository>
      </mode:repositories>
      

       

      Would appreciate your help, as I really like Modeshape and I'm pushing and motivating for its adoption in our organisation.

       

      Thank you,

      -Michael

        • 1. Re: Sequencing of new content added through SVN connector
          rhauch

          The ModeShape SVN connector does not currently monitor SVN for changes (made by other clients) and publish those changes as ModeShape events. As a result, ModeShape does not "see" these changes made by other clients.

           

          It is possible to add this functionality to the SVN connector, but that simply hasn't been high enough priority for the current contributors.

          • 2. Re: Sequencing of new content added through SVN connector
            mkmichem

            Thanks Randall,

             

            Ok ... I will have to add that functionality then ...

            you can consider me a fellow contributor for the time being

             

            I have decided to build a custom SVN connector that contains the sequencing feature.

            I've also logged a feature request MODE-1415

             

            If you guys consider my connector worthwile,

            then perhaps we could add it to the "built-in" connectors list.

            -M

            • 3. Re: Sequencing of new content added through SVN connector
              rhauch

              We'd be very happy to have you contribute.

               

              Regarding the SVN connector, our recent 2.8.0.Final release was our last planned minor release on the 2.x branch. We have been planning to release a patch release (e.g., 2.8.1.Final, since we're only fixing bugs) sometime in late March or early April. Instead, we could consider issuing another minor release (e.g., 2.9.0.Final) to include the bug fixes and your improvements to the SVN connector.

               

              All new feature development has switched to the 3.0 branch (the 'master' branch in Git), and in 3.0 the connector API/SPI will be changing. We can talk more about that if you want, but it's not clearly defined yet as we've been focusing mostly on the core JCR TCK functionality. We'll obviously port the SVN connector, and we'd love to have it watch/poll for changes in the SVN repository and generate the corresponding events within ModeShape.

               

              WDYT?