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

bndtools normal behavior violated as variables are not supported in gradle for deploy

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 7.1.1 CE GA2
    • Fix Version/s: None
    • Labels:
      None

      Description

      Normally, bndtools would allow the use of variables to generate jars.

      For instance, it is perfectly valid to use:
      Bundle-SymbolicName: ${groupName}.${artifactId};...

      Given that gradle will create project variables and bndtools will use them to generate the metadata.

      However, besides the fact that standard Gradle tasks work as expected, generating jars with metadata, Liferay's custom task called "deploy" will ignore variables and use the symbolic name as a literal, deploying jars with that variable in its name. Even though the built jar has the correct name.

      To reproduce:
      Using Liferay's workspace, set the symbolicname to something with a variable, then deploy. The jar file is generated correctly inside the build director, but the symbolic name literal is used as name for deployment follow by the jar extension.

      In gradle, one could have for a module build.gradle the following:
      ext.groupName = 'tech.esystems.liferay.smartling'

      and in the bnd file:
      Bundle-SymbolicName: ${groupName}.example

      the file would be deployed as:
      ${groupName}.example.jar

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            victorlima02 Victor de Lima Soares
            Participants of an Issue:
            Recent user:
            Victor de Lima Soares
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              2 years, 47 weeks ago

                Packages

                Version Package