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

Tooling API: Allow to completely suppress stdout and stderr

    Details

    • Type: Improvement
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.4
    • Fix Version/s: None

      Description

      The tooling api already provides ability to define custom stdout and stderr. However, it seems that that doesn't redirect all output to the provided streams. Consider the simple example below:

      java client
      package org;
      
      import org.gradle.tooling.GradleConnector;
      import org.gradle.tooling.ModelBuilder;
      import org.gradle.tooling.ProjectConnection;
      import org.gradle.tooling.model.idea.IdeaProject;
      
      import java.io.File;
      import java.io.IOException;
      import java.io.OutputStream;
      
      public class TestClient {
      
        private static final String PROJECT_PATH = "/home/denis/dev/gradle/gradle-1.4/samples/java/multiproject";
      
        public static void main(String[] args) throws InterruptedException {
          GradleConnector connector = GradleConnector.newConnector();
          connector.forProjectDirectory(new File(PROJECT_PATH));
          ProjectConnection connection = connector.connect();
          ModelBuilder<IdeaProject> modelBuilder = connection.model(IdeaProject.class);
          OutputStream dummy = new OutputStream() {
            @Override
            public void write(int b) throws IOException {
            }
          };
          modelBuilder.setStandardOutput(dummy);
          modelBuilder.setStandardError(dummy);
          modelBuilder.get();
          connection.close();
        }
      }
      
      

      It defines instructs the tooling api to use empty stdout and stderr but the application produces the following output:

      21:55:13.285 [Connection worker] DEBUG o.g.t.i.provider.DefaultConnection - Provider implementation created.
      21:55:13.346 [Connection worker] DEBUG o.g.t.i.provider.DefaultConnection - Embedded executer support created.
      21:55:13.353 [Connection worker] DEBUG o.g.t.i.provider.DefaultConnection - Configuring logging to level: INFO
      Tooling API uses target gradle version: 1.4.
      Starting Gradle daemon
      Starting daemon process: workingDir = /home/denis/.gradle/daemon/1.4, daemonArgs: [/home/denis/dev/jdk/jdk1.7.0_13/bin/java, -XX:MaxPermSize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Xmx1024m, -Dfile.encoding=UTF-8, -cp, /home/denis/.gradle/wrapper/dists/gradle-1.4-bin/47n6g3pbi5plc7n8fn58nkinje/gradle-1.4/lib/gradle-launcher-1.4.jar, org.gradle.launcher.daemon.bootstrap.GradleDaemon, 1.4, /home/denis/.gradle/daemon, 10800000, d4655041-b24b-4c54-b994-e65c845cbf7a, -XX:MaxPermSize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Xmx1024m, -Dfile.encoding=UTF-8]
      Starting process 'Gradle build daemon'. Working directory: /home/denis/.gradle/daemon/1.4 Command: /home/denis/dev/jdk/jdk1.7.0_13/bin/java -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=UTF-8 -cp /home/denis/.gradle/wrapper/dists/gradle-1.4-bin/47n6g3pbi5plc7n8fn58nkinje/gradle-1.4/lib/gradle-launcher-1.4.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 1.4 /home/denis/.gradle/daemon 10800000 d4655041-b24b-4c54-b994-e65c845cbf7a -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx1024m -Dfile.encoding=UTF-8
      An attempt to initialize for well behaving parent process finished.
      Successfully started process 'Gradle build daemon'
      Process 'Gradle build daemon' finished with exit value 0 (state: DETACHED)
      An attempt to start the daemon took 0.442 secs.
      Connected to the daemon. Dispatching Build{id=f8947130-747d-46fa-adcf-850e8bd85dc6.1, currentDir=/home/denis/project/java/gradle-api-client} request.
      :buildSrc:compileJava UP-TO-DATE
      :buildSrc:compileGroovy UP-TO-DATE
      :buildSrc:processResources UP-TO-DATE
      :buildSrc:classes UP-TO-DATE
      :buildSrc:jar UP-TO-DATE
      :buildSrc:assemble UP-TO-DATE
      :buildSrc:compileTestJava
      :buildSrc:compileTestGroovy UP-TO-DATE
      :buildSrc:processTestResources UP-TO-DATE
      :buildSrc:testClasses
      :buildSrc:test
      :buildSrc:check
      :buildSrc:build
      Download http://repo1.maven.org/maven2/commons-io/commons-io/1.2/commons-io-1.2.pom
      Download http://repo1.maven.org/maven2/commons-lang/commons-lang/2.4/commons-lang-2.4-sources.jar
      Download http://repo1.maven.org/maven2/commons-io/commons-io/1.2/commons-io-1.2-sources.jar
      Download http://repo1.maven.org/maven2/commons-io/commons-io/1.2/commons-io-1.2.jar
      
      BUILD SUCCESSFUL
      
      Total time: 8.5 secs
      

      When a build.gradle is invalid a huge error report is printed as well:

      22:04:44.347 [Connection worker] DEBUG o.g.t.i.provider.DefaultConnection - Provider implementation created.
      22:04:44.409 [Connection worker] DEBUG o.g.t.i.provider.DefaultConnection - Embedded executer support created.
      22:04:44.416 [Connection worker] DEBUG o.g.t.i.provider.DefaultConnection - Configuring logging to level: INFO
      Tooling API uses target gradle version: 1.4.
      Connected to the daemon. Dispatching Build{id=ee4b62f3-c80e-4054-bddd-c2e93eba7907.1, currentDir=/home/denis/project/java/gradle-api-client} request.
      :buildSrc:compileJava UP-TO-DATE
      :buildSrc:compileGroovy UP-TO-DATE
      :buildSrc:processResources UP-TO-DATE
      :buildSrc:classes UP-TO-DATE
      :buildSrc:jar UP-TO-DATE
      :buildSrc:assemble UP-TO-DATE
      :buildSrc:compileTestJava UP-TO-DATE
      :buildSrc:compileTestGroovy UP-TO-DATE
      :buildSrc:processTestResources UP-TO-DATE
      :buildSrc:testClasses UP-TO-DATE
      :buildSrc:test UP-TO-DATE
      :buildSrc:check UP-TO-DATE
      :buildSrc:build UP-TO-DATE
      
      FAILURE: Build failed with an exception.
      
      * Where:
      Build file '/home/denis/dev/gradle/gradle-1.4/samples/java/multiproject/build.gradle' line: 23
      
      * What went wrong:
      A problem occurred evaluating root project 'multiproject'.
      > Could not find property 'asfas' on root project 'multiproject'.
      
      * Try:
      Run with --info or --debug option to get more log output.
      
      * Exception is:
      org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'multiproject'.
      	at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
      	at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:127)
      	at org.gradle.configuration.BuildScriptProcessor.evaluate(BuildScriptProcessor.java:38)
      	at org.gradle.configuration.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:43)
      	at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:466)
      	at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:77)
      	at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:23)
      	at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:21)
      	at org.gradle.api.internal.Actions$CompositeAction.execute(Actions.java:78)
      	at org.gradle.api.internal.Actions$TransformingActionAdapter.execute(Actions.java:130)
      	at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:442)
      	at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:437)
      	at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:40)
      	at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:142)
      	at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
      	at org.gradle.initialization.DefaultGradleLauncher.getBuildAnalysis(DefaultGradleLauncher.java:92)
      	at org.gradle.tooling.internal.provider.BuildModelAction.run(BuildModelAction.java:70)
      	at org.gradle.tooling.internal.provider.DelegatingBuildModelAction.run(DelegatingBuildModelAction.java:44)
      	at org.gradle.tooling.internal.provider.ConfiguringBuildAction.run(ConfiguringBuildAction.java:98)
      	at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:39)
      	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:126)
      	at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:42)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfBuildAndStop.java:33)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.ReturnResult.execute(ReturnResult.java:34)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:70)
      	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:68)
      	at org.gradle.util.Swapper.swap(Swapper.java:38)
      	at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:68)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
      	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:59)
      	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:45)
      	at org.gradle.launcher.daemon.server.DaemonStateCoordinator.runCommand(DaemonStateCoordinator.java:186)
      	at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy.doBuild(StartBuildOrRespondWithBusy.java:49)
      	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.HandleStop.execute(HandleStop.java:36)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.CatchAndForwardDaemonFailure.execute(CatchAndForwardDaemonFailure.java:32)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.DefaultDaemonCommandExecuter.executeCommand(DefaultDaemonCommandExecuter.java:48)
      	at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.handleCommand(DefaultIncomingConnectionHandler.java:155)
      	at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.receiveAndHandleCommand(DefaultIncomingConnectionHandler.java:128)
      	at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.run(DefaultIncomingConnectionHandler.java:116)
      	at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
      Caused by: groovy.lang.MissingPropertyException: Could not find property 'asfas' on root project 'multiproject'.
      	at org.gradle.api.internal.AbstractDynamicObject.propertyMissingException(AbstractDynamicObject.java:43)
      	at org.gradle.api.internal.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:35)
      	at org.gradle.api.internal.CompositeDynamicObject.getProperty(CompositeDynamicObject.java:94)
      	at org.gradle.groovy.scripts.BasicScript.propertyMissing(BasicScript.java:70)
      	at build_vtde6re3759go5hfcril41uks.run(/home/denis/dev/gradle/gradle-1.4/samples/java/multiproject/build.gradle:23)
      	at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
      	... 55 more
      
      
      BUILD FAILED
      
      Total time: 1.572 secs
      Exception in thread "main" org.gradle.tooling.BuildException: Could not fetch model of type 'IdeaProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.4-bin.zip'.
      	at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:53)
      	at org.gradle.tooling.internal.consumer.async.DefaultAsyncConnection$2.run(DefaultAsyncConnection.java:71)
      	at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	at java.lang.Thread.run(Thread.java:722)
      Caused by: org.gradle.api.internal.LocationAwareException: Build file '/home/denis/dev/gradle/gradle-1.4/samples/java/multiproject/build.gradle' line: 23
      A problem occurred evaluating root project 'multiproject'.
      	at org.gradle.initialization.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:85)
      	at org.gradle.initialization.MultipleBuildFailuresExceptionAnalyser.transform(MultipleBuildFailuresExceptionAnalyser.java:47)
      	at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:115)
      	at org.gradle.initialization.DefaultGradleLauncher.getBuildAnalysis(DefaultGradleLauncher.java:92)
      	at org.gradle.tooling.internal.provider.BuildModelAction.run(BuildModelAction.java:70)
      	at org.gradle.tooling.internal.provider.DelegatingBuildModelAction.run(DelegatingBuildModelAction.java:44)
      	at org.gradle.tooling.internal.provider.ConfiguringBuildAction.run(ConfiguringBuildAction.java:98)
      	at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:39)
      	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:126)
      	at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:42)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfBuildAndStop.java:33)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.ReturnResult.execute(ReturnResult.java:34)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:70)
      	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:68)
      	at org.gradle.util.Swapper.swap(Swapper.java:38)
      	at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:68)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
      	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:59)
      	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:45)
      	at org.gradle.launcher.daemon.server.DaemonStateCoordinator.runCommand(DaemonStateCoordinator.java:186)
      	at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy.doBuild(StartBuildOrRespondWithBusy.java:49)
      	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.HandleStop.execute(HandleStop.java:36)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.CatchAndForwardDaemonFailure.execute(CatchAndForwardDaemonFailure.java:32)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.DefaultDaemonCommandExecuter.executeCommand(DefaultDaemonCommandExecuter.java:48)
      	at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.handleCommand(DefaultIncomingConnectionHandler.java:155)
      	at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.receiveAndHandleCommand(DefaultIncomingConnectionHandler.java:128)
      	at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.run(DefaultIncomingConnectionHandler.java:116)
      	... 4 more
      Caused by: org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'multiproject'.
      	at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
      	at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:127)
      	at org.gradle.configuration.BuildScriptProcessor.evaluate(BuildScriptProcessor.java:38)
      	at org.gradle.configuration.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:43)
      	at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:466)
      	at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:77)
      	at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:23)
      	at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:21)
      	at org.gradle.api.internal.Actions$CompositeAction.execute(Actions.java:78)
      	at org.gradle.api.internal.Actions$TransformingActionAdapter.execute(Actions.java:130)
      	at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:442)
      	at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:437)
      	at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:40)
      	at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:142)
      	at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
      	at org.gradle.initialization.DefaultGradleLauncher.getBuildAnalysis(DefaultGradleLauncher.java:92)
      	at org.gradle.tooling.internal.provider.BuildModelAction.run(BuildModelAction.java:70)
      	at org.gradle.tooling.internal.provider.DelegatingBuildModelAction.run(DelegatingBuildModelAction.java:44)
      	at org.gradle.tooling.internal.provider.ConfiguringBuildAction.run(ConfiguringBuildAction.java:98)
      	at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:39)
      	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:126)
      	at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:42)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:24)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.StartStopIfBuildAndStop.execute(StartStopIfBuildAndStop.java:33)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.ReturnResult.execute(ReturnResult.java:34)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:70)
      	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:68)
      	at org.gradle.util.Swapper.swap(Swapper.java:38)
      	at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:68)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
      	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:59)
      	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:45)
      	at org.gradle.launcher.daemon.server.DaemonStateCoordinator.runCommand(DaemonStateCoordinator.java:186)
      	at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy.doBuild(StartBuildOrRespondWithBusy.java:49)
      	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:34)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.HandleStop.execute(HandleStop.java:36)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.CatchAndForwardDaemonFailure.execute(CatchAndForwardDaemonFailure.java:32)
      	at org.gradle.launcher.daemon.server.exec.DaemonCommandExecution.proceed(DaemonCommandExecution.java:126)
      	at org.gradle.launcher.daemon.server.exec.DefaultDaemonCommandExecuter.executeCommand(DefaultDaemonCommandExecuter.java:48)
      	at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.handleCommand(DefaultIncomingConnectionHandler.java:155)
      	at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.receiveAndHandleCommand(DefaultIncomingConnectionHandler.java:128)
      	at org.gradle.launcher.daemon.server.DefaultIncomingConnectionHandler$ConnectionWorker.run(DefaultIncomingConnectionHandler.java:116)
      	at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:66)
      Caused by: groovy.lang.MissingPropertyException: Could not find property 'asfas' on root project 'multiproject'.
      	at org.gradle.api.internal.AbstractDynamicObject.propertyMissingException(AbstractDynamicObject.java:43)
      	at org.gradle.api.internal.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:35)
      	at org.gradle.api.internal.CompositeDynamicObject.getProperty(CompositeDynamicObject.java:94)
      	at org.gradle.groovy.scripts.BasicScript.propertyMissing(BasicScript.java:70)
      	at build_vtde6re3759go5hfcril41uks.run(/home/denis/dev/gradle/gradle-1.4/samples/java/multiproject/build.gradle:23)
      	at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:52)
      	... 55 more
      
      

      That prevents us from providing 'full auto-import'. I.e. it would have been possible to monitor gradle scripts modification at tooling api client and refresh a project on such events (practically, not that simple but scheduling a refresh and executing it if no changes have been made particular amount of time). However, there is a possible case that particular gradle script is inconsistent at the moment of typing and then we have a huge logs pollution by error information generated by gradle.

        Activity

        Hide
        lhotari Lari Hotari added a comment -
        Show
        lhotari Lari Hotari added a comment - I started hacking on some stuff https://github.com/lhotari/gradle/commits/ansi_support
        Hide
        lhotari Lari Hotari added a comment -

        I got the colored output working and I believe it also fixes this issue GRADLE-2687. I made a PR: https://github.com/gradle/gradle/pull/340

        Show
        lhotari Lari Hotari added a comment - I got the colored output working and I believe it also fixes this issue GRADLE-2687 . I made a PR: https://github.com/gradle/gradle/pull/340
        Hide
        radimk Radim Kubacki added a comment -

        First changeset from that patch is integrated now. I' going to take a look at the next part to redirect the log messages too before the operation is started.

        Show
        radimk Radim Kubacki added a comment - First changeset from that patch is integrated now. I' going to take a look at the next part to redirect the log messages too before the operation is started.
        Hide
        graemerocher Graeme Rocher added a comment -

        Any progress on this issue? It is impacting the development of Grails 3.0

        Show
        graemerocher Graeme Rocher added a comment - Any progress on this issue? It is impacting the development of Grails 3.0
        Hide
        szpak Marcin Zajaczkowski added a comment -

        Probably a reason mentioned by Lari also causes that messages printed directly on stdout/stderr cannot be tested/asserted with nebula-test (what was possible with Gradle 1.x).

        Show
        szpak Marcin Zajaczkowski added a comment - Probably a reason mentioned by Lari also causes that messages printed directly on stdout/stderr cannot be tested/asserted with nebula-test (what was possible with Gradle 1.x).

          People

          • Assignee:
            radimk Radim Kubacki
            Reporter:
            denis.zhdanov Denis Zhdanov
          • Votes:
            29 Vote for this issue
            Watchers:
            24 Start watching this issue

            Dates

            • Created:
              Updated:

              Development