Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-2043

Unknown command-line option causes unexpected internal error with stack trace

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.0-milestone-7
    • Fix Version/s: 1.3-rc-1

      Description

      Calling gradle with an unknown command line option (eg. because of a typo) causes a "messy" output like this:

      $ gradle printDate --dryRun
      Note: the Gradle build daemon is an experimental feature.
      As such, you may experience unexpected build failures. You may need to occasionally stop the daemon.

      FAILURE: Build aborted because of an internal error.

      • What went wrong:
        Build aborted because of an unexpected internal error. Please file an issue at: http://www.gradle.org.
      • Try:
        Run with --debug option to get additional debug info.
      • Exception is:
        org.gradle.cli.CommandLineArgumentException: Unknown command-line option '--dryRun'.
        at org.gradle.cli.CommandLineParser$BeforeFirstSubCommand.onStartOption(CommandLineParser.java:302)
        at org.gradle.cli.CommandLineParser.parse(CommandLineParser.java:89)
        at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.doSelect(TaskNameResolvingBuildConfigurationAction.java:95)
        at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.configure(TaskNameResolvingBuildConfigurationAction.java:56)
        at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42)
        at org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExecuter.java:23)
        at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:48)
        at org.gradle.execution.ExcludedTaskFilteringBuildConfigurationAction.configure(ExcludedTaskFilteringBuildConfigurationAction.java:55)
        at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42)
        at org.gradle.execution.DefaultBuildExecuter.access$100(DefaultBuildExecuter.java:23)
        at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:48)
        at org.gradle.execution.DefaultTasksBuildExecutionAction.configure(DefaultTasksBuildExecutionAction.java:38)
        at org.gradle.execution.DefaultBuildExecuter.configure(DefaultBuildExecuter.java:42)
        at org.gradle.execution.DefaultBuildExecuter.select(DefaultBuildExecuter.java:35)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:145)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:108)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:76)
        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:45)
        at org.gradle.launcher.daemon.protocol.Build.run(Build.java:67)
        at org.gradle.launcher.daemon.protocol.Build.run(Build.java:63)
        at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:45)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:45)
        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.CatchAndForwardDaemonFailureAsResult.execute(CatchAndForwardDaemonFailureAsResult.java:24)
        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24)
        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.ReturnResult.execute(ReturnResult.java:32)
        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$4.call(ForwardClientInput.java:112)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput$4.call(ForwardClientInput.java:110)
        at org.gradle.util.Swapper.swap(Swapper.java:38)
        at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:110)
        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:47)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:48)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy.doBuild(StartBuildOrRespondWithBusy.java:37)
        at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.HandleStop.execute(HandleStop.java:34)
        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.CatchAndForwardDaemonFailure.execute(CatchAndForwardDaemonFailure.java:34)
        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.HandleClientDisconnectBeforeSendingCommand.execute(HandleClientDisconnectBeforeSendingCommand.java:21)
        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.StopConnectionAfterExecution.execute(StopConnectionAfterExecution.java:22)
        at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122)
        at org.gradle.launcher.daemon.server.exec.DefaultDaemonCommandExecuter.executeCommand(DefaultDaemonCommandExecuter.java:49)
        at org.gradle.launcher.daemon.server.Daemon$1$1.run(Daemon.java:113)
        at org.gradle.messaging.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:680)

      BUILD FAILED

      Wouldn't it be better to have a decent feedback and infos like the output from "gradle help"?

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            stefanscheidt Stefan Scheidt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: