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

Ant inherits wrong module.name when building ext/build.xml

    Details

      Description

      When issuing "ant war" from the SDK /ext directory, the wrong module.name property is used.
      This can be shown by adding:
      <target name="showModuleName">
      <echo>module.name=${module.name}</echo>
      </target>
      to build-common-ext.xml and have the "war" target depend on "showModuleName,compile".

      If we assume we have an ext-project named "webshop-ext", building directly in /ext/webshop-ext will work fine, but building in the ext directory will use module.name=webshop-ext when the build descends into the submodules of the webshop-ext project. I.e. module.name would be expected to be "ext-service" in that submodule.

      The problem possibly relates to passing params to ant tasks. This will have the param be sent as a command line parameter and not inhibited by subsequent inheritAll="false". So when the first level of "loop-modules" in "build-common-plugins.xml" is executed, the inheritAll="false" of the "war-module" task will not inhibit the outer module.name (= webshop-ext) to be sent. When the "compile" target of build-common-ext.xml subsequently is called, sending a module.name as param in compilation antcalls will be overriden by the module.name sent as command line parameter and module.name will thus still be "webshop-ext" instead of the expected "service" etc.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 29 weeks, 5 days ago

                Packages

                Version Package
                6.2.0 CE M4