title: gradle exclude run task for subproject
body: <p>I have the following project-structure:</p>
  
  <pre><code>Root project 'rmi-tutorial'
  +--- Project ':client'
  +--- Project ':lib'
  \--- Project ':server'
  </code></pre>
  
  <p>When I execute the run task of the root-project I will get the following error:</p>
  
  <pre><code>Execution failed for task ':lib:run'.
  </code></pre>
  
  <p>How can I exclude the :lib subproject from being run? I don't want to exclude the subproject completly and I also don't want to exclude it manually via command line parameters. When I execute the "build" task of the root-project it should build lib. When i execute "run" of the root-project it should run only the sub-projects "server" and "client".</p>
  
  <p>Moreover server should be run before client. Any idea how to accomplish this without starting it manually in the correct order?</p>
  
  <p>I know that I can do:</p>
  
  <pre><code>gradlew.bat build
  gradlew.bat server:run
  gradlew.bat client:run
  </code></pre>
  
  <p>but that is not what i want to do. I would prefer something like this:</p>
  
  <pre><code>gradlew.bat run
  </code></pre>