本文介绍了Gradle --show-version的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是maven的gradle模拟--show-version选项?

What is gradle analog for maven --show-version option?

 -V,--show-version                      Display version information
                                        WITHOUT stopping build

输出包括maven,java ans OS版本

Output includes maven, java ans OS versions

Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 23:22:22+0800)
Maven home: D:\Progs\maven\apache-maven-3.1.1
Java version: 1.7.0_11, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_11\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"  

-version停止构建.下面两行给出的结果相同:仅版本

-version stops the build. Both line below give the same result: version only

gradle build -version
gradle -version build

推荐答案

您可以使用:

gradle -v

这是输出:

------------------------------------------------------------
Gradle 1.10
------------------------------------------------------------
Build time:   2013-12-17 09:28:15 UTC
Build number: none
Revision:     36ced393628875ff15575fa03d16c1349ffe8bb6
Groovy:       1.8.6
Ant:          Apache Ant(TM) version 1.9.2 compiled on July 8 2013
Ivy:          2.2.0
JVM:          1.7.0_51 (Oracle Corporation 24.51-b03)
OS:           Linux 2.6.32-042stab079.5 amd64

如果在CI环境中使用它,它不会停止构建.

If you use it in CI environment, it doesn't stop the build.

这篇关于Gradle --show-version的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 10:54