简体   繁体   中英

How pass Gradle command parameters to execute a task through Buildship

I know that if in Gradle I use: build -x test it builds and the test are not executed.

In STS with Buildship for support with Gradle, for example for Spring Integration

It has the following two tasks of my interest ( build and test ):

在此处输入图像描述

I can build with the following:

在此处输入图像描述

Because some test fails (randomly) I want skip the tests, so I tried

在此处输入图像描述

it fails with:

在此处输入图像描述

So I tried with:

在此处输入图像描述

And fails with

在此处输入图像描述

And with:

在此处输入图像描述

Nothing happens, only shows the following and stopping:

在此处输入图像描述

So how represent build -x test correctly with Buildship?

You must supply -x test as Program Arguments like this:

Program Arguments 配置以从 Gradle 构建中排除测试

Or you just run assemble instead of build . assemble is a lifecycle task that aggregates all archive tasks in the project and, besides other tasks, does not execute check tasks, such as test .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM