Details

      Description

      When you enter

      gradlew createTenant -PtenantId=test

      you get

      FAILURE: Build failed with an exception.
      
      * Where:
      Build file 'C:\projectsASF\ofbiz-framework\build.gradle' line: 764
      
      * What went wrong:
      A problem occurred evaluating root project 'ofbiz'.
      > Could not get unknown property 'pluginId' for task ':installAllPlugins' of type org.gradle.api.DefaultTask.
      
      1. OFBIZ-9273.patch
        0.4 kB
        Swapnil M Mane

        Activity

        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        This is related with a change I made and is not a real issue

        Show
        jacques.le.roux Jacques Le Roux added a comment - This is related with a change I made and is not a real issue
        Hide
        jacques.le.roux Jacques Le Roux added a comment - - edited

        Actually no, it's related to changes I made but I can't reproduce

        Show
        jacques.le.roux Jacques Le Roux added a comment - - edited Actually no, it's related to changes I made but I can't reproduce
        Hide
        deepak.dixit Deepak Dixit added a comment -

        I am also getting same error,

        • Setup ofibz-framework (w/o plugins)
        • Created new plugins using ./gradlew cratePluing -PpluginId=myPlugin
        • run ./gradlew build
        Deepaks-MacBook-Pro:plain_ofbiz deepakdixit$ ./gradlew build
        
        FAILURE: Build failed with an exception.
        
        * Where:
        Build file '/Users/deepakdixit/sandbox/plain_ofbiz/build.gradle' line: 764
        
        * What went wrong:
        A problem occurred evaluating root project 'ofbiz'.
        > Could not get unknown property 'pluginId' for task ':installAllPlugins' of type org.gradle.api.DefaultTask.
        
        * Try:
        Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
        
        BUILD FAILED
        
        Total time: 4.333 secs
        Deepaks-MacBook-Pro:plain_ofbiz deepakdixit$ 
        
        Show
        deepak.dixit Deepak Dixit added a comment - I am also getting same error, Setup ofibz-framework (w/o plugins) Created new plugins using ./gradlew cratePluing -PpluginId=myPlugin run ./gradlew build Deepaks-MacBook-Pro:plain_ofbiz deepakdixit$ ./gradlew build FAILURE: Build failed with an exception. * Where: Build file '/Users/deepakdixit/sandbox/plain_ofbiz/build.gradle' line: 764 * What went wrong: A problem occurred evaluating root project 'ofbiz'. > Could not get unknown property 'pluginId' for task ':installAllPlugins' of type org.gradle.api.DefaultTask. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 4.333 secs Deepaks-MacBook-Pro:plain_ofbiz deepakdixit$
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Thanks Deepak!

        Show
        jacques.le.roux Jacques Le Roux added a comment - Thanks Deepak!
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Note: as the trunk demo now shows, using pullAllPluginsSource does not generate this error

        Show
        jacques.le.roux Jacques Le Roux added a comment - Note: as the trunk demo now shows, using pullAllPluginsSource does not generate this error
        Hide
        swapnilmmane Swapnil M Mane added a comment - - edited

        I faced the same error in build, after the creation the new plugin.

        As per the exploration, this issue is due creation of build.gradle file in plugin (with empty gradle task defined in it)

        dependencies {
            //Examples of compile-time and runtime dependencies
        
            //pluginLibsCompile 'junit:junit-dep:4.10'
            //pluginLibsRuntime 'junit:junit-dep:4.10'
        }
        
        task install {
            doLast {
                // Install logic for this plugin
            }
        }
        
        task uninstall {
            doLast {
                // uninstall logic for this plugin
            }
        }
        

        To avoid the build fail, here are the 3 proposals.

        1.) Comment the complete newly created build.gradle file.

        /*
        dependencies {
            //Examples of compile-time and runtime dependencies
        
            //pluginLibsCompile 'junit:junit-dep:4.10'
            //pluginLibsRuntime 'junit:junit-dep:4.10'
        }
        
        task install {
            doLast {
                // Install logic for this plugin
            }
        }
        
        task uninstall {
            doLast {
                // uninstall logic for this plugin
            }
        }
        */
        

        For this we will need to edit the template
        ofbiz-framework/framework/resources/templates/build.gradle

        2.) Create empty build.gradle file
        For this again we will need to edit the template
        ofbiz-framework/framework/resources/templates/build.gradle

        3.) Don't create any build.gradle file.

        I would like to know the opinion from the community on this.

        Thanks!

        Show
        swapnilmmane Swapnil M Mane added a comment - - edited I faced the same error in build, after the creation the new plugin. As per the exploration, this issue is due creation of build.gradle file in plugin (with empty gradle task defined in it) dependencies { //Examples of compile-time and runtime dependencies //pluginLibsCompile 'junit:junit-dep:4.10' //pluginLibsRuntime 'junit:junit-dep:4.10' } task install { doLast { // Install logic for this plugin } } task uninstall { doLast { // uninstall logic for this plugin } } To avoid the build fail, here are the 3 proposals. 1.) Comment the complete newly created build.gradle file. /* dependencies { //Examples of compile-time and runtime dependencies //pluginLibsCompile 'junit:junit-dep:4.10' //pluginLibsRuntime 'junit:junit-dep:4.10' } task install { doLast { // Install logic for this plugin } } task uninstall { doLast { // uninstall logic for this plugin } } */ For this we will need to edit the template ofbiz-framework/framework/resources/templates/build.gradle 2.) Create empty build.gradle file For this again we will need to edit the template ofbiz-framework/framework/resources/templates/build.gradle 3.) Don't create any build.gradle file. I would like to know the opinion from the community on this. Thanks!
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Thanks Swapnil,

        This is an important matter. Since the build.gradle plugin file does nothing OOTB I think it should simply be a documented how-to. So the option 1) fits with me!

        Show
        jacques.le.roux Jacques Le Roux added a comment - Thanks Swapnil, This is an important matter. Since the build.gradle plugin file does nothing OOTB I think it should simply be a documented how-to. So the option 1) fits with me!
        Hide
        swapnilmmane Swapnil M Mane added a comment -

        Thank you Jacques Le Roux for your inputs. Sounds good to me.
        For option #1, will provide the patch soon.

        Show
        swapnilmmane Swapnil M Mane added a comment - Thank you Jacques Le Roux for your inputs. Sounds good to me. For option #1, will provide the patch soon.
        Hide
        swapnilmmane Swapnil M Mane added a comment - - edited

        Hello team,

        Here is the patch for fixing the build error after creating new plugin.
        Commented the build.gradle templates file.

        This issue is due creation of build.gradle file in plugin (with empty gradle task defined in it)

        Thanks Jacques Le Roux for your inputs.

        Show
        swapnilmmane Swapnil M Mane added a comment - - edited Hello team, Here is the patch for fixing the build error after creating new plugin. Commented the build.gradle templates file. This issue is due creation of build.gradle file in plugin (with empty gradle task defined in it) Thanks Jacques Le Roux for your inputs.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Thanks Swapnil

        Your patch is in
        trunk r1791143
        R16.11 r1791144

        Show
        jacques.le.roux Jacques Le Roux added a comment - Thanks Swapnil Your patch is in trunk r1791143 R16.11 r1791144
        Hide
        taher Taher Alkhateeb added a comment -

        The fix is wrong, and you committed without understanding the root cause of the problem (which you created). Please revert.

        Show
        taher Taher Alkhateeb added a comment - The fix is wrong, and you committed without understanding the root cause of the problem (which you created). Please revert.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        I Reverted: r1791144

        I was totally wrong to backport, R16.11 branch does not contain this issue.

        Show
        jacques.le.roux Jacques Le Roux added a comment - I Reverted: r1791144 I was totally wrong to backport, R16.11 branch does not contain this issue.
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Taher Alkhateeb you sent a message in dev ML, I answered, please continue there, thanks

        Show
        jacques.le.roux Jacques Le Roux added a comment - Taher Alkhateeb you sent a message in dev ML, I answered, please continue there, thanks
        Hide
        taher Taher Alkhateeb added a comment -

        Committed a fix in r1791143 which is a real fix of the root cause.

        Show
        taher Taher Alkhateeb added a comment - Committed a fix in r1791143 which is a real fix of the root cause.
        Hide
        taher Taher Alkhateeb added a comment -

        Sorry, I meant r1791168

        Show
        taher Taher Alkhateeb added a comment - Sorry, I meant r1791168
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        OK Taher, since you did not answer clearly in dev ML, please comment about

        The fix is wrong, and you committed without understanding the root cause of the problem (which you created).

        What did I create?

        Show
        jacques.le.roux Jacques Le Roux added a comment - OK Taher, since you did not answer clearly in dev ML, please comment about The fix is wrong, and you committed without understanding the root cause of the problem (which you created). What did I create?
        Hide
        jacques.le.roux Jacques Le Roux added a comment -

        Taher,

        Sorry we crossed on wire.

        For me all the related code was committed by you for OFBIZ-9182 http://ofbiz.markmail.org/search/?q=dependsOn+%22%3Aplugins%3A%24%7BpluginId%7D%3Ainstall%22

        Since this issue was random, and looking at your code, I'm not against reverting. But please explain the issue you said I created and where?

        Show
        jacques.le.roux Jacques Le Roux added a comment - Taher, Sorry we crossed on wire. For me all the related code was committed by you for OFBIZ-9182 http://ofbiz.markmail.org/search/?q=dependsOn+%22%3Aplugins%3A%24%7BpluginId%7D%3Ainstall%22 Since this issue was random, and looking at your code, I'm not against reverting. But please explain the issue you said I created and where?
        Hide
        swapnilmmane Swapnil M Mane added a comment -

        Thank you Jacques Le Roux and Taher Alkhateeb for detailed discussion and fix

        Show
        swapnilmmane Swapnil M Mane added a comment - Thank you Jacques Le Roux and Taher Alkhateeb for detailed discussion and fix
        Hide
        taher Taher Alkhateeb added a comment -

        Your work and efforts are much appreciated Swapnil.

        Hi Jacques, as I mentioned earlier I already committed a fix. So please revert the commenting out of build.gradle.

        Show
        taher Taher Alkhateeb added a comment - Your work and efforts are much appreciated Swapnil. Hi Jacques, as I mentioned earlier I already committed a fix. So please revert the commenting out of build.gradle.
        Hide
        jacques.le.roux Jacques Le Roux added a comment - - edited

        Hi Taher,

        I reverted at revision: 1791218

        About your allegation of the issue I created, I'd have accepted your apologies...

        Show
        jacques.le.roux Jacques Le Roux added a comment - - edited Hi Taher, I reverted at revision: 1791218 About your allegation of the issue I created, I'd have accepted your apologies...

          People

          • Assignee:
            jacques.le.roux Jacques Le Roux
            Reporter:
            jacques.le.roux Jacques Le Roux
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development