gpt4 book ai didi

eclipse - 使用gradle将依赖项导入eclipse

转载 作者:行者123 更新时间:2023-12-03 05:46:16 24 4
gpt4 key购买 nike

我有一个看起来足够的 gradle 文件,但 eclipse 拒绝识别我尝试导入的依赖项(尽管在实现依赖项后刷新了 gradle 项目)

我的 gradle 文件缺少 buildscript{} block ,但我对 gradle 还不够熟悉来实现它。我的构建文件是由 eclipse 自动生成的,所以我不明白为什么会出现问题。

我正在尝试导入 "com.intrinio:sdk:0.0.1"
build.gradle:

// Apply the java-library plugin to add support for Java Library
apply plugin: 'java-library'

// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}

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'


compile "com.intrinio:sdk:0.0.1"

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

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

}

最佳答案

我想这是 the lib你想用。
由于它没有部署在公共(public)存储库中,因此您必须手动安装它。从 github checkout 项目并执行以下操作:

Installation

To install the Intrinio Java SDK to your local Maven repository, simply execute:

mvn install


然后,在你的 gradle 文件中,添加 mavenLocal()repository部分,它应该可以正常工作。

关于eclipse - 使用gradle将依赖项导入eclipse,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50028685/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com