可执行jar的Gradle类路径

时间:2020-09-23 18:43:09

标签: java gradle build jar dependencies

我想用gradle生成我的Java项目的可执行jar文件。但是,我不知道如何引用依赖项的jar,因为它们位于项目外部的某些缓存目录中。如何将它们纳入我的项目。

这些是我的依赖项:

dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
api 'org.apache.commons:commons-math3:3.6.1'

// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:29.0-jre'

// Use JUnit test framework
testImplementation 'junit:junit:4.13'

implementation 'mysql:mysql-connector-java:8.0.19'
implementation 'org.hibernate:hibernate-core:5.4.12.Final'
implementation 'org.hibernate.validator:hibernate-validator:6.0.18.Final'
implementation 'org.hibernate:hibernate-c3p0:5.4.21.Final'
implementation 'org.reflections:reflections:0.9.11'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.11.2'
}

谢谢您的帮助!

0 个答案:

没有答案