Thanks Olivier,

Seems it's unrelated and Mathieu is working on it :)

Jacques


Le 13/08/2018 à 17:07, Olivier Heintz a écrit :
I'm on a debian stretch,

I'm just testing with a ubuntu 18.04 and Oracle JDK and there is then same 
message

No install task defined for plugin testPlugin1, nothing to do




Le 13/08/2018 à 16:36, Jacques Le Roux a écrit :
Hi Olivier,

Did you try with an Oracle JDK? Also which Linux distribution/version are you 
using?

Jacques


Le 13/08/2018 à 16:28, Olivier Heintz a écrit :
Yes, I confirm, with the old code it works
( I have found which commit after multiple test, each one for each commit on 
build.gradle ;-) )

Le 13/08/2018 à 14:12, Taher Alkhateeb a écrit :
Hi Olivier,

Can you confirm that if you test _before_ this commit that it works?
If yes, then this commit needs to be reverted.
On Mon, Aug 13, 2018 at 1:22 PM Olivier Heintz
<holivier.li...@ofbizextra.org> wrote:
Hi,

In my environment (Linux,  openjdk version "1.8.0_171") plugin install process 
does not work any more since this commit (june, 20)

   def taskExistsInproject(fullyQualifiedProject, taskName) {
-    def taskExists = false
-    subprojects.each { subProject ->
-        if (subProject.getPath().equals(fullyQualifiedProject.toString())) {
-            subProject.tasks.each { projTask ->
-                if (taskName.equals(projTask.name)) {
-                    taskExists = true
-                }
-            }
-        }
-    }
-    return taskExists
+    subprojects.stream()
+        .filter { it.path == fullyQualifiedProject.toString() }
+        .flatMap { it.tasks.stream() }
+        .anyMatch taskName.&equals
   }


When I try to install the message is

   ./gradlew installPlugin -PpluginId=testPlugin1
:installPlugin
No install task defined for plugin testPlugin1, nothing to do

BUILD SUCCESSFUL

Total time: 1.516 secs


My testPlugin1 build.gradle is very simple
task install {
          doLast {
                  println 'install task for my plugin test1'
                  exec{ commandLine 'echo', 'Bonjour' } // this could be what 
you want
          }
}

task uninstall {
          doLast {
                  println 'un-install task for my plugin test1'
                  exec{ commandLine 'echo', 'Au-revoir' } // this could be what 
you want
          }
}

task hello {
          doLast {
             println 'tutorialspoint'
          }
}



with the previous version of taskExistsInproject  it works

└─$ ./gradlew installPlugin -PpluginId=testPlugin1
:plugins:testPlugin1:install
install task for my plugin test1
Bonjour
:installPlugin
installed plugin testPlugin1

BUILD SUCCESSFUL

Total time: 3.134 secs


Reply via email to