我看到了这个问题,但似乎没有任何帮助。我会尽力使答案更好,并希望能给出解决方案。
在我的 build.gradle
在 dependencies
下我有:compile files('oracle/ojdbc7-12.1.0.2.jar')
我手动将jar放在目录中。
我现在正在做的是试图将它从 nuxus 中拉出来。
我我的本地 gradle.properties
我添加了我的用户名和密码,但它会提取所有依赖项并且无法从 nexus 获取它们并且失败。我只想拉一个jar
(jbdc) 与 gradle 构建。
错误在这里:
> Configure project :api
init.gradle/NexusRepositoryPlugin: MavenRepo at https://repo.maven.apache.org/maven2/ removed.
init.gradle/NexusRepositoryPlugin: __plugin_repository__Gradle Central Plugin Repository kept (not a Maven repository).
init.gradle/NexusRepositoryPlugin: MavenRepo at https://repo.maven.apache.org/maven2/ removed.
init.gradle/NexusRepositoryPlugin: BintrayJCenter at https://jcenter.bintray.com/ removed.
* What went wrong:
Could not resolve all dependencies for configuration ':api:detachedConfiguration1'.
> Could not resolve org.springframework.boot:spring-boot-dependencies:2.0.1.RELEASE.
Required by:
project :api
> Could not resolve org.springframework.boot:spring-boot-dependencies:2.0.1.RELEASE.
建议?
最佳答案
我对这个问题的理解表明您正在将公共(public)存储库声明替换为仅包含该 JDBC jar 的私有(private)存储库声明。
相反,您应该保留公共(public)存储库声明并添加私有(private)存储库声明。然后 Gradle 将在第一次搜索 JDBC jar 并检索它。
关于gradle - 使用 gradle 从 Nexus 获取 oracle JDBC jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50852509/