cancel
Showing results for 
Search instead for 
Did you mean: 

share-config.xml 4.0.e to 4.2.c

wizar
Champ in-the-making
Champ in-the-making
Hello, I need rebuild share.war from version 4.0.e to 4.2.c. How I should change pom.xml(for maven) and share-config.xml? And where I can read full change log?
3 REPLIES 3

afaust
Legendary Innovator
Legendary Innovator
Hello,

how you should change your POM depends on how you've been using it. Without an example, it is difficult to say. If you've been using the POMs from the Alfresco Maven SDK, it should basically just be a matter of updating your dependency (and any transitive dependencies).
Regarding share-config-custom.xml, it too depends on the kind of customizations you've made. Anything in regards to Forms and basic configuration (framework, aspects / subtypes) can usually remain as-they-were, but you might want to check out the configuration of documentlibrary-related items, like metadata templates, dependencies and custom actions.

I don't think you will find a full change log - at least not in a manner that anyone can make much use of. If you are interested in the various changes to the Surf and Share UI framework, I highly advise you to catch up with the blog of <a href="http://blogs.alfresco.com/wp/developer/author/ddraper/">Dave Draper</a>. You can additionally look through the <a href="http://issues.alfresco.com">JIRA</a> to identify changes that have made it into a 4.2 release (or any in between - but be aware, that some Enterprise 4.x tickets may not yet have their changes merged into HEAD).

Regards
Axel

wizar
Champ in-the-making
Champ in-the-making
Thanks. I have changed my pom.xml properties section(I don't sure about versions used in 4.2.c) to

<alfresco.version>4.2.c</alfresco.version>
        <spring.version>3.0.5.RELEASE</spring.version>
        <activiti.version>5.10</activiti.version>
        <spring.surf.version>1.2.0-M3</spring.surf.version>
        <jasperreports.version>4.7.0</jasperreports.version>
      <slf4j.version>1.5.11</slf4j.version>
      <spring.security.version>3.1.0.RC2</spring.security.version>
      <acegisecurity.version>0.8.2</acegisecurity.version>
        <platform.version>0.1.0</platform.version>
        <buildNumber>1</buildNumber>

Also changed http://maven.alfresco.com to https://artifacts.alfresco.com. It builds, but /alfreso is 404 and I can't login in share. I'm sure that the deal in share-config.xml:

<alfresco-config>

   <plug-ins>
      <element-readers>
         <element-reader element-name="kerberos" class="org.alfresco.web.site.servlet.config.KerberosConfigElementReader"/>
         <element-reader element-name="header" class="org.alfresco.web.config.header.HeaderElementReader"/>
      </element-readers>
   </plug-ins>

   <!– Global config section –>
   <config>
      <flags>
         <!–
            Developer debugging setting to turn on DEBUG mode for client scripts in the browser
         –>
         <client-debug>${share.script.cient.debug}</client-debug>
         <!–
            LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl, Ctrl, Shift, Shift).
            This flag automatically activates logging on page load.
         –>
         <client-debug-autologging>false</client-debug-autologging>
      </flags>
     
      <header>
         <app-items>
            <!– defaults: icon="{id}.png" label="header.{id}.label" description="header.{id}.description" –>
            <item type="link" id="my-dashboard">{userdashboardpage}</item>
            <item type="js" id="sites">Alfresco.module.Sites</item>
            <item type="link" id="people">/people-finder</item>
            <item type="link" id="repository" condition="conditionRepositoryRootNode">/repository</item>
            <item type="container" id="more">
               <container-group id="my">
                  <item type="link" id="my-tasks">/my-tasks</item>
                  <item type="link" id="my-workflows">/my-workflows</item>
                  <item type="link" id="my-content">/user/user-content</item>
                  <item type="link" id="my-sites">/user/user-sites</item>
                  <item type="link" id="my-profile">{userprofilepage}</item>
               </container-group>
               <container-group id="tools" permission="admin">
                  <item type="link" id="application">/console/admin-console/application</item>
                  <item type="link" id="groups">/console/admin-console/groups</item>
                  <item type="link" id="replication-jobs" condition="!conditionEditionTeam">/console/admin-console/replication-jobs</item>
                  <item type="link" id="repository">/console/admin-console/repository</item>
                  <item type="link" id="trashcan">/console/admin-console/trashcan</item>
                  <item type="link" id="users">/console/admin-console/users</item>
                  <item type="link" id="more">/console/admin-console/</item>
               </container-group>
            </item>
         </app-items>
         <user-items>
            <item type="container" id="user" icon="" description="">
               <container-group id="usermenu" label="">
                  <item type="user" id="status">{userprofilepage}</item>
                  <item type="link" id="my-profile">{userprofilepage}</item>
                  <item type="link" id="change-password" condition="user.capabilities.isMutable">/user/change-password</item>
                  <item type="external-link" id="help">{share-help}</item>
                  <item type="link" id="logout" condition="!context.externalAuthentication">/dologout</item>
               </container-group>
            </item>
         </user-items>
         <dependencies>
            <css src="/modules/create-site.css" />
            <css src="/modules/header/sites.css" />
            <js src="/modules/create-site.js" />
            <js src="/modules/header/sites.js" />
         </dependencies>
      </header>
   </config>

   <config evaluator="string-compare" condition="Edition">
      <!– footer logo and copyright text –>
      <footer>
         <logo>alfresco-share-logo.png</logo>
         <alt-text>Alfresco Share</alt-text>
         <css-class>footer-com</css-class>
         <label>label.copyright</label>
      </footer>
      <about>
         <css-class>logo-com</css-class>
      </about>
   </config>

   <config evaluator="string-compare" condition="UriTemplate">
      <!– list of URI based page Id templates used by Share –>
      <!– when pages are requested from the framework, matches are attempted
           against each uri-template, and the token values returned if matched –>
      <uri-templates>
         <uri-template id="sitedashboardpage">/site/{site}/dashboard</uri-template>
         <uri-template id="sitepage">/site/{site}/{pageid}</uri-template>
         <uri-template id="userdashboardpage">/user/{userid}/dashboard</uri-template>
         <uri-template id="userpage">/user/{userid}/{pageid}</uri-template>
         <uri-template id="userprofilepage">/user/{userid}/profile</uri-template>
         <uri-template id="userdefaultpage">/user/{pageid}</uri-template>
         <uri-template id="consoletoolpage">/console/{pageid}/{toolid}</uri-template>
         <uri-template id="consolepage">/console/{pageid}</uri-template>
      </uri-templates>
   </config>

   <config evaluator="string-compare" condition="SitePages">
      <pages>
         <page id="calendar">calendar</page>
         <page id="wiki-page">wiki-page?title=Main_Page</page>
         <page id="documentlibrary">documentlibrary</page>
         <page id="discussions-topiclist">discussions-topiclist</page>
         <page id="blog-postlist">blog-postlist</page>
         <page id="links">links</page>
         <page id="data-lists">data-lists</page>
      </pages>
   </config>

   <config evaluator="string-compare" condition="Users">
      <users>
         <!– minimum length for username and password –>
         <username-min-length>2</username-min-length>
         <password-min-length>3</password-min-length>
      </users>
   </config>

   <config evaluator="string-compare" condition="Dashboard">
      <dashboard>
         <!– The suggested maximum list size for summary dashlets on the dashboards.
              If dashlets have been configured to use this value then they will restrict list sizes –>
         <summary-list-size>100</summary-list-size>
      </dashboard>
   </config>

  
   <config evaluator="string-compare" condition="Console">
      <groups>
         <!– maximum number of groups & users to return in the column browser for each page –>
         <max-page-size>50</max-page-size>
      </groups>
   </config>

   <config evaluator="string-compare" condition="Search">
      <search>
         <!– default minimum length for search terms –>
         <min-search-term-length>1</min-search-term-length>
        
         <!– default maximum number of results for a search –>
         <max-search-results>250</max-search-results>
        
         <!– Repository search configuration option –>
         <!–
              The 'repository-search' config element value can be one of:
              none - disable repository wide search option
              context - search depending on current context, including repository, all sites, current site (default)
              always - always search full repository no matter what the context, disables search context options
         –>
         <repository-search>context</repository-search>
      </search>
     
      <!– sorting fields and labels –>
      <!–
         The 'sort' config element contains the name of the content model field
         to sort against and can be of the form:
          . Short QName string e.g. "cm:name"
          . Pseudo cm:content field starting with a "." e.g. ".size"
          . Any other valid sortable fts-alfresco special field e.g. "TYPE"
         The field can be optionally followed by |true or |false to indicate sort direction,
         where true = ascending, false = descending
        
         The element supports the following optional attributes:
            label = label text to display
            labelId = I18N message id of label text to display
      –>
      <sorting>
         <sort labelId="search.sort.relevance"></sort>
         <sort labelId="label.name">cm:name</sort>
         <sort labelId="label.title">cm:title</sort>
         <sort labelId="label.description">cm:description</sort>
         <sort labelId="label.author">cm:author</sort>
         <sort labelId="label.modifier">cm:modifier</sort>
         <sort labelId="label.modified">cm:modified|false</sort>
         <sort labelId="label.creator">cm:creator</sort>
         <sort labelId="label.created">cm:created|false</sort>
         <sort labelId="search.sort.size">.size|true</sort>
         <sort labelId="search.sort.mimetype">.mimetype</sort>
         <sort labelId="search.sort.type">TYPE</sort>
      </sorting>
   </config>
  
   <config evaluator="string-compare" condition="AdvancedSearch">
      <advanced-search>
         <!– Forms for the advanced search type list –>
         <forms>
            <!–
               The 'form' config element contains the name of the model type
               of the form to display.
              
               The element supports the following optional attributes:
                  id = form id, the id of "search" will be assumed if not set
                  label = label text to display - defaults to model type if not set
                  labelId = I18N message id of label text to display
                  description = description text to display
                  descriptionId = I18N message id of description text to display
            –>
            <form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
            <form labelId="search.form.label.cm_folder" descriptionId="search.form.desc.cm_folder">cm:folder</form>
         </forms>
      </advanced-search>
   </config>

   <config evaluator="string-compare" condition="Replication">
      <share-urls>
         <!–
            To discover a Repository Id, browse to the remote server's CMIS landing page at:
              http://{server}:{port}/alfresco/service/cmis/index.html
            The Repository Id field is found under the "CMIS Repository Information" expandable panel.

            Example config entry:
              <share-url repositoryId="622f9533-2a1e-48fe-af4e-ee9e41667ea4">http://new-york-office/share/</share-url>
         –>
      </share-urls>
   </config>

   <!– Workflow config section –>
   <config evaluator="string-compare" condition="Workflow">
      <!– A list of workflow definitions that are NOT displayed in Share –>
      <hidden-workflows>
         <!– Hide all WCM related workflows –>
         <workflow name="jbpm$wcmwf:*"/>
         <workflow name="jbpm$wf:articleapproval"/>
         <!– Hide publishing workflows –>
         <workflow name="activiti$publishWebContent"/>
         <workflow name="jbpm$publishWebContent"/>
         <!– Hide invitation workflows –>
         <workflow name="jbpm$inwf:invitation-nominated"/>
         <workflow name="jbpm$imwf:invitation-moderated"/>
         <workflow name="activiti$activitiInvitationModerated"/>
         <workflow name="activiti$activitiInvitationNominated"/>
      </hidden-workflows>

      <!– A list of workflow tasks that are NOT displayed in Share  –>
      <hidden-tasks>
         <!– Hide all WCM related tasks –>
         <task type="wcmwf:*"/>
      </hidden-tasks>
   </config>
  
   <!– Remote section - use Surf RequestCachingConnector to improve remoting performance –>
   <config evaluator="string-compare" condition="Remote">
      <remote>
         <connector>
            <id>alfresco</id>
            <name>Alfresco Connector</name>
            <description>Connects to an Alfresco instance using cookie-based authentication</description>
            <class>org.springframework.extensions.webscripts.RequestCachingConnector</class>
            <authenticator-id>alfresco-ticket</authenticator-id>
         </connector>
        
         <!– Activiti admin authentication –>
         <authenticator>
            <id>activiti-admin-authenticator</id>
            <name>activiti-admin-authenticator</name>
            <description>Authenticator authenticating against alfresco, but
               used on activiti-admin endpoint</description>
            <class>org.alfresco.web.config.ActivitiAdminAuthenticator</class>
         </authenticator>
         <connector>
            <id>activiti-admin-connector</id>
            <name>Alfresco Activiti Admin UI Connector</name>
            <description>Connects to an Activiti UI instance using
               ticket-based authentication</description>
            <class>org.alfresco.web.config.ActivitiAdminConnector</class>
            <authenticator-id>activiti-admin-authenticator</authenticator-id>
         </connector>
         <endpoint>
            <id>activiti-admin</id>
            <name>Activiti Admin UI - user access</name>
            <description>Access to Activiti Admin UI, that requires user authentication</description>
            <connector-id>activiti-admin-connector</connector-id>
            <endpoint-url>http://localhost:8080/alfresco/activiti-admin</endpoint-url>
            <identity>user</identity>
         </endpoint>
      </remote>
   </config>

</alfresco-config>

I have changed just two strings:

<item type="link" id="my-tasks">/my-tasks#filter=workflows|active</item>
<item type="link" id="my-workflows">/my-workflows#filter=workflows|active</item>

So, how should I change share-config? I'm using custom modules.

afaust
Legendary Innovator
Legendary Innovator
Hello,

ok, those two changes you can just put into the share-config-custom.xml as before. The main question is, why is your repository 404ing? What do the logfiles of the repository say (alfresco.log)? You only said you wanted to migrate the share.war to 4.2 - have you also migrated / adapted the alfresco.war (which always needs to be the same version as Share)? Have you tried manually accessing the /alfresco application?

Regards
Axel
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.