eclipsegradlebuildship

How to exclude test task when the gradle build task is run using Eclipse Buildship plugin?


I am using Eclipse Buildship plugin for executing Gradle tasks on my project. Any idea how to exclude the test task when the build task is run? In Gradle STS plugin, I used to update the Program arguments to '-x test' which skipped the test task. When I tried the same with Buildship, getting the below error.

* What went wrong:
Task ' test' not found in root project

Solution

  • Have you considered running the "assemble" task instead of "build"?

    :build
    +--- :assemble
    |    \--- :jar
    |         \--- :classes
    |              +--- :compileJava
    |              \--- :processResources
    \--- :check
         \--- :test
              +--- :classes
              |    +--- :compileJava
              |    \--- :processResources
              \--- :testClasses
                   +--- :compileTestJava
                   |    \--- :classes
                   |         +--- :compileJava
                   |         \--- :processResources
                   \--- :processTestResources