"task not found in root project" error

Hi,
the error I get is this:

[niko@dev1 portal]$ export WAS_HOME=/home/niko/lrdev/master/bundles/websphere-8.5.5.0
[niko@dev1 portal]$ export GRADLE_OPTS="-Xmx2048m -XX:MaxPermSize=512m"
[niko@dev1 portal]$ ./gradlew --parallel -Dportal.build=true --no-daemon --project-cache-dir=/home/niko/lrdev/master/portal/.gradle --stacktrace -Dapp.server.parent.dir=/home/niko/lrdev/master/bundles -Dforced.cache.enabled=true -Dliferay.home=/home/niko/lrdev/master/bundles deploy
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
Parallel execution is an incubating feature.

FAILURE: Build failed with an exception.

  • What went wrong:
    Task ‘deploy’ not found in root project ‘portal’.
  • Try:
    Run gradlew tasks to get a list of available tasks. Run with --info or --debug option to get more log output.
  • Exception is:
    org.gradle.execution.TaskSelectionException: Task ‘deploy’ not found in root project ‘portal’.
    at org.gradle.execution.TaskSelector.getSelection(TaskSelector.java:100)
    at org.gradle.execution.TaskSelector.getSelection(TaskSelector.java:75)
    at org.gradle.execution.commandline.CommandLineTaskParser.parseTasks(CommandLineTaskParser.java:42)
    at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.configure(TaskNameResolvingBuildConfigurationAction.java:44)
    at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.java:48)
    at org.gradle.execution.DefaultBuildConfigurationActionExecuter.access$000(DefaultBuildConfigurationActionExecuter.java:25)
    at org.gradle.execution.DefaultBuildConfigurationActionExecuter$1.proceed(DefaultBuildConfigurationActionExecuter.java:54)
    at org.gradle.execution.DefaultTasksBuildExecutionAction.configure(DefaultTasksBuildExecutionAction.java:44)
    at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.java:48)
    at org.gradle.execution.DefaultBuildConfigurationActionExecuter.access$000(DefaultBuildConfigurationActionExecuter.java:25)
    at org.gradle.execution.DefaultBuildConfigurationActionExecuter$1.proceed(DefaultBuildConfigurationActionExecuter.java:54)
    at org.gradle.execution.ExcludedTaskFilteringBuildConfigurationAction.configure(ExcludedTaskFilteringBuildConfigurationAction.java:47)
    at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configure(DefaultBuildConfigurationActionExecuter.java:48)
    at org.gradle.execution.DefaultBuildConfigurationActionExecuter.select(DefaultBuildConfigurationActionExecuter.java:36)
    at org.gradle.initialization.DefaultGradleLauncher$3.run(DefaultGradleLauncher.java:143)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:140)
    at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
    at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
    at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:77)
    at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:47)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
    at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
    at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
    at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:33)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

Now, the same command is being run from the ant (from which I extracted this command arguments and put it on the shell above) perfetly fine:

The ’ characters around the executable and arguments are
not part of the command.
[chmod] Applied chmod to 1 file and 0 directories.
[exec] Current OS is Linux
[exec] Setting environment variable: WAS_HOME=/home/niko/lrdev/master/bundles/websphere-8.5.5.0
[exec] Setting environment variable: GRADLE_OPTS=-Xmx2048m -XX:MaxPermSize=512m
[exec] Executing ‘/home/niko/lrdev/master/portal/gradlew’ with arguments:
[exec] ‘–parallel’
[exec] ‘-Dportal.build=true’
[exec] ‘–no-daemon’
[exec] ‘–project-cache-dir=/home/niko/lrdev/master/portal/.gradle’
[exec] ‘–stacktrace’
[exec] ‘-Dapp.server.parent.dir=/home/niko/lrdev/master/bundles’
[exec] ‘-Dforced.cache.enabled=true’
[exec] ‘-Dliferay.home=/home/niko/lrdev/master/bundles’
[exec] ‘deploy’
[exec]
[exec] The ’ characters around the executable and arguments are
[exec] not part of the command.
Execute:Java13CommandLauncher: Executing ‘/home/niko/lrdev/master/portal/gradlew’ with arguments:
’–parallel’
’-Dportal.build=true’
’–no-daemon’
’–project-cache-dir=/home/niko/lrdev/master/portal/.gradle’
’–stacktrace’
’-Dapp.server.parent.dir=/home/niko/lrdev/master/bundles’
’-Dforced.cache.enabled=true’
’-Dliferay.home=/home/niko/lrdev/master/bundles’
‘deploy’

Why ant runs ok, but running same command in bash produces error?

the version of the program is this:

[niko@dev1 portal]$ ./gradlew -v
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0


Gradle 2.8

Build time: 2015-10-20 03:46:36 UTC
Build number: none
Revision: b463d7980c40d44c4657dc80025275b84a29e31f

Groovy: 2.4.4
Ant: Apache Ant™ version 1.9.3 compiled on December 23 2013
JVM: 1.8.0_65 (Oracle Corporation 25.65-b01)
OS: Linux 4.2.8-300.fc23.x86_64 amd64

[niko@dev1 portal]$

TIA
Nulik