`gradle jar`似乎没有在jar文件中添加依赖项 [英] `gradle jar` doesn't seem to be adding dependencies to jar file
本文介绍了`gradle jar`似乎没有在jar文件中添加依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想制作一个可执行文件,该文件将自动创建带有相关任务的Google任务列表.
I'm wanting to make an executable file that will automatically create a Google Task list with associated tasks.
但是,现在,我正尝试使用Google提供的默认代码简单地创建可执行文件.
Right now, however, I'm trying to simply create an executable using the default code that Google provides here. Once you add the credentials.json
file (explained below) and enter gradle run
(in the repo I've provided) in a terminal/cmd, it will work as expectedly.
但是,如果您运行gradle jar
创建一个jar,尝试运行jar时会出现此错误:
However, if you run gradle jar
to create a jar, you will get this error when you try to run the jar:
java.lang.NoClassDefFoundError:com/google/api/client/json/JsonFactory
java.lang.NoClassDefFoundError: com/google/api/client/json/JsonFactory
如何繁殖
- 克隆此存储库
查看全文