Run Gradle with verbose class loading?

梦想的初衷 提交于 2019-12-07 08:56:56

问题


My build script is encountering an error (below). Is there a way to run Gradle with the same type of output as invoking Java with -verbose:class?

The error in question, should anyone have some input:

Caused by: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':Project:compile'.
    at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.wrapException(ErrorHandlingArtifactDependencyResolver.java:49)
    ... more
Caused by: java.lang.LinkageError: loader constraints violated when linking org/apache/ivy/core/module/descriptor/DependencyDescriptor class

回答1:


You can set the following environment variable, I believe...

GRADLE_OPTS="$GRADLE_OPTS -verbose:class"

and then invoke gradle. Read this link.

Once Gradle is downloaded and unzipped, the environment variable GRADLE_HOME can be set to the directory of the unzipped Gradle installation and the PATH should be set to $GRADLE_HOME/bin or %GRADLE_HOME%\bin. The Gradle installation page tells us that JVM options used by Gradle can be set via either GRADLE_OPTS or JAVA_OPTS. The Grade installation and configuration in the path can be confirmed by running gradle -v at the command line once the environment variable settings are sourced.



来源:https://stackoverflow.com/questions/15578072/run-gradle-with-verbose-class-loading

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!