Hi,
I found out the explanation when I ran the run task from the parent directory.
The run delegates to run task of the whatever child modules the application plugin is activated.
And in my case one of the child module has an incorrect configuration of it (the main class was not configured).