Bootstrapping ModuleComponents with versions does not work

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

Bootstrapping ModuleComponents with versions does not work

Hi Alfresco Experts, 

Please can you tell me why bootstrapping is not working as expected? I am putting my share and platform jar under .

/opt/alfresco/app/alfresco/modules/share/ and /opt/alfresco/app/alfresco/modules/platform

Currently, I see that the first JAR (5.1 version) that I added got picked up by alfresco. I then added but the next versioned JAR (5.2) but that did not get picked up by alfresco. The logs do say that the jar version has been upgraded.  But I don't see the changes getting applied by alfresco.

1. I have tried both the ImporterModuleComponents with the same moduleId but different versions ((higher version to the previous) - This does not work

2. I have also tried have different names and different version (higher version to the previous) - This also does not work

3. I also added a depends On with the higher version dependent on the lower version. This also does not work

<bean id="com.test.alfresco.bootstrap.site.sg"
      class="org.alfresco.repo.module.ImporterModuleComponent"
      parent="module.baseComponent">

    <!-- Module Details -->
    <property name="moduleId" value="alfresco-bootstrap-platform-jar" />
    <property name="name" value="test-sg" />
    <property name="description" value="Bootstrap test SG site" />
    <property name="sinceVersion" value="5.1" />
    <property name="appliesFromVersion" value="5.1" />
    <!-- Data properties -->
    <property name="importer" ref="spacesBootstrap"/>
    <property name="bootstrapViews">
        <list>
            <props>
                <prop key="path">/${alfresco_user_store.system_container.childname}</prop>
                <prop key="location">alfresco/module/${project.artifactId}/bootstrap/sites/test-sg/groups.xml</prop>
            </props>
            <props>
                <prop key="path">/${spaces.company_home.childname}/${spaces.sites.childname}</prop>
                <prop key="location">alfresco/module/${project.artifactId}/bootstrap/sites/test-sg/Contents.acp</prop>
            </props>
        </list>
    </property>
</bean>

<bean id="com.test.alfresco.bootstrap.test.sg.folders"
      class="org.alfresco.repo.module.ImporterModuleComponent"
      parent="module.baseComponent">

    <property name="moduleId" value="alfresco-bootstrap-platform-jar" />
    <property name="name" value="test-sg-folders" />
    <property name="description" value="test SG folders" />
    <property name="sinceVersion" value="5.2" />
    <property name="appliesFromVersion" value="5.2" />


    <property name="importer" ref="spacesBootstrap"/>
    <property name="bootstrapViews">
        <list>
            <props>
                <prop key="path">/${spaces.company_home.childname}/${spaces.sites.childname}/cm:test-sg/cm:documentLibrary</prop>
                <prop key="location">alfresco/module/alfresco-bootstrap-platform-jar/bootstrap/bootstrap-folders.xml</prop>
            </props>
        </list>
    </property>
</bean>
5 Replies
Highlighted

Re: Bootstrapping ModuleComponents with versions does not work

Once a patch has been applied to an Alfresco installation, it's not applied anymore.

You should change "moduleId" value in order to be loaded.

Software Engineer in Alfresco Search Team.
Highlighted
Member II

Re: Bootstrapping ModuleComponents with versions does not work

I changed the moduleId to a different name and also increased the version., but that did not import the new module with the higher version. Not sure what I am missing here.

Highlighted

Re: Bootstrapping ModuleComponents with versions does not work

Have you tried with...

 <property name="executeOnceOnly" value="false" />

?

Software Engineer in Alfresco Search Team.
Highlighted
Member II

Re: Bootstrapping ModuleComponents with versions does not work

But won't that try executing the module every time alfresco starts up? That will cause issues if my importer is bootstrapping content model or sites for example, isn't it?

Highlighted

Re: Bootstrapping ModuleComponents with versions does not work

Yes.

You can also change your strategy and use "org.alfresco.repo.admin.patch.impl.GenericBootstrapPatch" instead.

Software Engineer in Alfresco Search Team.