alfresco-shareaikau

Aikau always looking at the existing files, not looking at the overrided files


Custom share project structure


 /custom-share/src/main/resources/META-INF/js/alfresco/services/SearchService.js
        /custom-share/src/main/resources/META-INF/js/alfresco/menus/CustomBulkSearchMenu.js
        /custom-share/src/main/resources/META-INF/js/alfresco/documentlibrary/views/CustomSimpleView.js

faceted-search.get.js


        services.push("alfresco/services/NavigationService",
                  "alfresco/services/SearchService",
                  "alfresco/services/ActionService",
                  "alfresco/services/DocumentService",
                  "alfresco/dialogs/AlfDialogService",
                  "alfresco/services/CrudService",
                  "alfresco/services/NotificationService");




widgets.unshift(accessMenu);
widgets.push(main);


model.jsonModel = getFooterModel(services, widgets);
model.jsonModel.groupMemberships = user.properties["alfUserGroups"];

I have overrided the SearchService.js & written some custom widgets files in the Custom Share Project for making changes in the faceted search ,but when i do quick search its still looking at the files inside Aikau jar and see below errors in the log but not looking at the files written inside the Custom project.we are using alfresco 5.1;

2017-02-28 02:03:03,734  ERROR [extensions.surf.DependencyAggregator] [http-bio-8081-exec-7] Could not find compressed file:       js/aikau/1.0.67.1/alfresco/menus/CustomBulkSearchMenu.js
2017-02-28 02:03:04,179  ERROR [extensions.surf.DependencyAggregator] 
[http-bio-8081-exec-7] Could not find compressed file: 
    js/aikau/1.0.67.1/alfresco/documentlibrary/views/CustomSimpleView.js



     search-extensions.xml
     *********************

     <extension>
        <modules>
            <module>
                <id>Search Enhancements</id>
                <auto-deploy>true</auto-deploy>
                <customizations>
                    <customization>
                        <targetPackageRoot>org.alfresco</targetPackageRoot>
                        <sourcePackageRoot>com.company.search</sourcePackageRoot>
                    </customization>
                </customizations>
            </module>
        </modules>
    </extension>

Solution

  • Even you should be keep the files in the same folder order of Aikau version. For ex,

    /custom-share/src/main/resources/META-INF/js/aikau/1.0.67.1/alfresco/documentlibrary/views/CustomSimpleView.js
    

    Maintain aikau's folder strcuture in your code base also and let us know, how it is goes?

    You should be very careful, when you're upgrading aikau versions and your code base folder structure should be in sync with aikau version.

    Otherwise you can use ant build task, to read the aikau version from build.properties file and emit the desired the folder structure what you want to generate.