Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-119872

Requesting an official extension point to build frontend resources in a modules_ext project

    Details

      Description

      Description:
      Currently, there is no automatic configuration and support for building frontend resources in a modules_ext project (when overriding a module like: com.liferay:com.liferay.journal.web:3.0.41). This request is for an official extension point to be provided.

      Use Case:
      1. Download Developer Studio 3.8.1 Windows Installer from Help Center
      2. Create a new workspace
      3. Right click workspace > New > Liferay Module Ext Project
      Project name: hook
      Original module name: click Browse > search for com.liferay:com.liferay.journal.web > select com.liferay:com.liferay.journal.web:3.0.41 > Ok
      4. Click Finish
      5. Right click project 'hook' > New > Liferay Module Ext Files
      6. Click Add Files from Original Module to Override... > Click com/liferay/journal/web/internal/display/context/JournalManagementToolbarDisplayContext.java
      7. Click Add Files from Original Module to Override... > Click META-INF/resources/js/ManagementToolbarDefaultEventHandler.es.js
      8. Click Finish
      9. Copy contents of build.gradle from attached journal-ext.zip to project 'hook' build.gradle, so it looks like this:

      dependencies {
      	originalModule group: "com.liferay", name: "com.liferay.journal.web"
      
      	compileOnly group: 'com.liferay', name: 'com.liferay.dynamic.data.mapping.api', version: '5.7.3'
      	compileOnly group: 'com.liferay', name: 'com.liferay.frontend.taglib.clay', version: '2.2.21'
      	compileOnly group: 'com.liferay', name: 'com.liferay.journal.api', version: '4.5.5'
      	compileOnly group: 'com.liferay', name: 'com.liferay.petra.function', version: '1.2.0' // actually '1.3.0'
      	compileOnly group: 'com.liferay', name: 'com.liferay.petra.string', version: '1.3.1' // actually '1.4.0'
      	compileOnly group: 'com.liferay', name: 'com.liferay.staging.api', version: '4.0.3'
      	compileOnly group: 'com.liferay', name: 'com.liferay.trash.api', version: '2.1.4'
      	compileOnly group: 'com.liferay.portal', name: 'com.liferay.portal.kernel', version: '4.40.0' // to be confirmed
      	compileOnly group: 'javax.portlet', name: 'portlet-api', version: '3.0.0'
      	compileOnly group: 'javax.servlet', name: 'javax.servlet-api', version: '3.0.1'
      }

      10. In the Gradle Tasks bar on the right, click > your-workspace > ext > hook > build > double click build (to create the jar)
      11. In the file system, go to your-workspace/ext/hook/build/libs/com.liferay.journal.web-3.0.41.ext.jar and check the file in META-INF/resources/js/ManagementToolbarDefaultEventHandler.es.js

      Result: The compiled JS file does not appear to be correct, when comparing it to the compiled version of the file seen in a clean 7.2 bundle. Please see the attached 'hook.zip', and I've also placed the OOTB com.liferay.journal.web-3.0.41.jar from a clean 7.2 bundle with dxp-3 fix pack.

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            john.park John Park
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Packages

                Version Package