apache httpclient clientprotocol classnotfoundexception when gradle with program args

apache httpclient clientprotocol classnotfoundexception when gradle with program args

我正在尝试 运行 gradlew test -Penv="envLocal"

这是抛出 ClassNotFound : ClientProtocolException 但没有 -Penv 它运行良好。

有人可以帮忙解决这个问题吗?

运行spring测试

找到答案了,是不同环境配置不同所致。