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

ToolsUtil (used by ServiceBuilder) supposes all packages starts with "com" or "org". Leads to compilation error due to residual country codes in generated code.

Details

    Description

      This unwanted behavior can be reproduced by using Blade or Maven to create a new service builder plugin. Here are the steps to reproduce with Blade.

      Steps to reproduce

      1. blade create -t service-builder -p es.com.packagepath packagepath
      2. cd packagepath
      3. blade gw buildService
      4. blade gw deploy

      Expected behavior

      Deployment occurs normally when you environment is correctly setup.

      Current behavior

      You get an error while deploying

      /Users/thecleydyr/packagepath/packagepath-api/src/main/java/es/com/packagepath/model/FooModel.java:338: error: cannot find symbol
              public es.Foo toEscapedModel();
                       ^
        symbol:   class Foo
        location: package es
      /Users/thecleydyr/packagepath/packagepath-api/src/main/java/es/com/packagepath/model/FooModel.java:341: error: cannot find symbol
              public es.Foo toUnescapedModel();
                       ^
        symbol:   class Foo
        location: package es
      /Users/thecleydyr/packagepath/packagepath-api/src/main/java/es/com/packagepath/model/FooWrapper.java:201: error: cannot find symbol
              public com.liferay.portal.kernel.model.CacheModel<es.Foo> toCacheModel() {
                                                                  ^
        symbol:   class Foo
        location: package es
      /Users/thecleydyr/packagepath/packagepath-api/src/main/java/es/com/packagepath/model/FooWrapper.java:206: error: cannot find symbol
              public es.Foo toEscapedModel() {
                       ^
        symbol:   class Foo
        location: package es
      /Users/thecleydyr/packagepath/packagepath-api/src/main/java/es/com/packagepath/model/FooWrapper.java:211: error: cannot find symbol
              public es.Foo toUnescapedModel() {
                       ^
        symbol:   class Foo
        location: package es
      /Users/thecleydyr/packagepath/packagepath-api/src/main/java/es/com/packagepath/model/FooWrapper.java:216: error: cannot find symbol
              public int compareTo(es.Foo foo) {
                                     ^
        symbol:   class Foo
        location: package es
      8 errors
      :packagepath-api:compileJava FAILED
      
      FAILURE: Build failed with an exception.
      

      Attachments

        Activity

          People

            brian.chan Brian Chan
            cleydyr.albuquerque Cleydyr Albuquerque (Inactive)
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              5 years, 28 weeks, 2 days ago

              Packages

                Version Package
                7.0.0 DXP FP30
                7.0.0 DXP FP31
                7.0.4 CE GA5
                7.0.5 CE GA6
                7.0.X